You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by KIRAN <rk...@gmail.com> on 2013/11/27 16:27:43 UTC
Extracting value from web page Source Code using JMeter
Hi,
I want to get a value from HTML Source Code of a page and pass it as a
parameter for the next request.
Is that possible to read HTML Source Code using JMeter?
If possible how can I get the value of SessionId from the below sample text
(this text is from the text displayed after right clicking on the HTML page
and selecting 'View Source'):
'ProgramType': '0', 'SessionId': '10152414', 'RatingVersion': '0'
Please help me in getting this resolved.
Thank you,
Kirna
Re: Extracting value from web page Source Code using JMeter
Posted by KIRAN <rk...@gmail.com>.
Thank you Naveen.
I have added listener 'View Results Tree' to the test and I don't see the
value when I search the response text.
But I am able to see the value in the source code when I manually check it.
Thank you,
Kiran
On Wed, Nov 27, 2013 at 11:45 AM, NaveenKumar Namachivayam <
catchnaveen.psgtech@gmail.com> wrote:
> I guess Web page source code and response is the same. Please check
> the number of occurence in the response.
>
> Thank you!
>
> On 11/27/13, KIRAN <rk...@gmail.com> wrote:
> > Thank you for a quick reply.
> >
> > I have already tried that option and failed to get the value.
> > I think Regular Expression Extractor only search for text in the response
> > text and not in the web page's source code.
> > I want to read value from web page's source code which we see by right
> > clicking on the web page and selecting 'View Source' option.
> >
> >
> > On Wed, Nov 27, 2013 at 10:42 AM, ZK <st...@gmail.com> wrote:
> >
> >> Hi,
> >> you would need to use a Post Processor:
> >> Regular Expression Extractor
> >>
> >> This Regular Expression would extract the SessionId:
> >>
> >> 'SessionId': '(\d+?)',
> >>
> >>
> >> So in the Regular Expression Extractor the settings would be:
> >> Reference Name:
> >> sessionId
> >>
> >> Regular Expression:
> >> 'SessionId': '(\d+?)',
> >>
> >> Template:
> >> $1$
> >>
> >> Match No.:
> >> 1
> >> Default Value:
> >> NOT_FOUND
> >>
> >>
> >>
> >>
> >> ZK
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://jmeter.512774.n5.nabble.com/Extracting-value-from-web-page-Source-Code-using-JMeter-tp5718772p5718773.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> >> For additional commands, e-mail: user-help@jmeter.apache.org
> >>
> >>
> >
> >
> > --
> > Regards,
> > Kiran
> >
>
>
> --
> Thank you,
>
> Regards,
> NaveenKumar N
> Visit www.QAInsights.com and www.Testifications.com and www.MyTechCube.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
--
Regards,
Kiran
Re: Extracting value from web page Source Code using JMeter
Posted by NaveenKumar Namachivayam <ca...@gmail.com>.
I guess Web page source code and response is the same. Please check
the number of occurence in the response.
Thank you!
On 11/27/13, KIRAN <rk...@gmail.com> wrote:
> Thank you for a quick reply.
>
> I have already tried that option and failed to get the value.
> I think Regular Expression Extractor only search for text in the response
> text and not in the web page's source code.
> I want to read value from web page's source code which we see by right
> clicking on the web page and selecting 'View Source' option.
>
>
> On Wed, Nov 27, 2013 at 10:42 AM, ZK <st...@gmail.com> wrote:
>
>> Hi,
>> you would need to use a Post Processor:
>> Regular Expression Extractor
>>
>> This Regular Expression would extract the SessionId:
>>
>> 'SessionId': '(\d+?)',
>>
>>
>> So in the Regular Expression Extractor the settings would be:
>> Reference Name:
>> sessionId
>>
>> Regular Expression:
>> 'SessionId': '(\d+?)',
>>
>> Template:
>> $1$
>>
>> Match No.:
>> 1
>> Default Value:
>> NOT_FOUND
>>
>>
>>
>>
>> ZK
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://jmeter.512774.n5.nabble.com/Extracting-value-from-web-page-Source-Code-using-JMeter-tp5718772p5718773.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>>
>
>
> --
> Regards,
> Kiran
>
--
Thank you,
Regards,
NaveenKumar N
Visit www.QAInsights.com and www.Testifications.com and www.MyTechCube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: Extracting value from web page Source Code using JMeter
Posted by KIRAN <rk...@gmail.com>.
Thank you for a quick reply.
I have already tried that option and failed to get the value.
I think Regular Expression Extractor only search for text in the response
text and not in the web page's source code.
I want to read value from web page's source code which we see by right
clicking on the web page and selecting 'View Source' option.
On Wed, Nov 27, 2013 at 10:42 AM, ZK <st...@gmail.com> wrote:
> Hi,
> you would need to use a Post Processor:
> Regular Expression Extractor
>
> This Regular Expression would extract the SessionId:
>
> 'SessionId': '(\d+?)',
>
>
> So in the Regular Expression Extractor the settings would be:
> Reference Name:
> sessionId
>
> Regular Expression:
> 'SessionId': '(\d+?)',
>
> Template:
> $1$
>
> Match No.:
> 1
> Default Value:
> NOT_FOUND
>
>
>
>
> ZK
>
>
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Extracting-value-from-web-page-Source-Code-using-JMeter-tp5718772p5718773.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
--
Regards,
Kiran
Re: Extracting value from web page Source Code using JMeter
Posted by ZK <st...@gmail.com>.
Hi,
you would need to use a Post Processor:
Regular Expression Extractor
This Regular Expression would extract the SessionId:
'SessionId': '(\d+?)',
So in the Regular Expression Extractor the settings would be:
Reference Name:
sessionId
Regular Expression:
'SessionId': '(\d+?)',
Template:
$1$
Match No.:
1
Default Value:
NOT_FOUND
ZK
--
View this message in context: http://jmeter.512774.n5.nabble.com/Extracting-value-from-web-page-Source-Code-using-JMeter-tp5718772p5718773.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org