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 2014/01/10 15:51:56 UTC

Reading/Parsing HTML source code

Hi,

Is there a way to read and parse HTML source code using JMeter?
If so, please explain me how to achieve this.

-- 
Thanks,
Kirna

Re: Reading/Parsing HTML source code

Posted by Deepak Shetty <sh...@gmail.com>.
The HTML source code IS part of the response text and any value in it can
be extracted using a regex (or otherwise) post processor[so "This value
will be displayed only at that place and won't be part of the response
text." does not make any sense].

*Usually* SessionIDs are stored in cookies though - in which case they are
not part of the response text , they are part of the response headers which
can also be extracted using the same extractors - or by just adding the
cookie manager (in which case you dont need to do anything else). If the ID
is part of the URL (as it has to be for URL Rewriting schemes ) then you
could use
http://jmeter.apache.org/usermanual/component_reference.html#HTTP_URL_Re-writing_Modifier


On Fri, Jan 10, 2014 at 8:17 AM, KIRAN <rk...@gmail.com> wrote:

> I need to capture 'SessionID' value from HTML source code.
> This value will be displayed only at that place and won't be part of the
> response text.
>
>
> On Fri, Jan 10, 2014 at 11:01 AM, Deepak Shetty <sh...@gmail.com> wrote:
>
> > Any Post processor or samplers that allows you to write your code + any
> > java library that allows you to parse HTML
> > e.g.
> >
> >
> http://jmeter.apache.org/usermanual/component_reference.html#postprocessors(Beanshell
> > , BSF post processors or the java sampler )
> > +
> > http://nekohtml.sourceforge.net/ or http://jsoup.org/
> >
> > The question is why do you want to do this? (or this might not be the
> > easiest way) If there is information you need from the HTML response the
> > Regex/CSS/JQuery post processors work most of the time.There are only
> some
> > advanced use cases where parsing the HTML helps...
> >
> >
> > On Fri, Jan 10, 2014 at 6:51 AM, KIRAN <rk...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Is there a way to read and parse HTML source code using JMeter?
> > > If so, please explain me how to achieve this.
> > >
> > > --
> > > Thanks,
> > > Kirna
> > >
> >
>
>
>
> --
> Regards,
> Kiran
>

Re: Reading/Parsing HTML source code

Posted by KIRAN <rk...@gmail.com>.
I need to capture 'SessionID' value from HTML source code.
This value will be displayed only at that place and won't be part of the
response text.


On Fri, Jan 10, 2014 at 11:01 AM, Deepak Shetty <sh...@gmail.com> wrote:

> Any Post processor or samplers that allows you to write your code + any
> java library that allows you to parse HTML
> e.g.
>
> http://jmeter.apache.org/usermanual/component_reference.html#postprocessors(Beanshell
> , BSF post processors or the java sampler )
> +
> http://nekohtml.sourceforge.net/ or http://jsoup.org/
>
> The question is why do you want to do this? (or this might not be the
> easiest way) If there is information you need from the HTML response the
> Regex/CSS/JQuery post processors work most of the time.There are only some
> advanced use cases where parsing the HTML helps...
>
>
> On Fri, Jan 10, 2014 at 6:51 AM, KIRAN <rk...@gmail.com> wrote:
>
> > Hi,
> >
> > Is there a way to read and parse HTML source code using JMeter?
> > If so, please explain me how to achieve this.
> >
> > --
> > Thanks,
> > Kirna
> >
>



-- 
Regards,
Kiran

Re: Reading/Parsing HTML source code

Posted by Deepak Shetty <sh...@gmail.com>.
Any Post processor or samplers that allows you to write your code + any
java library that allows you to parse HTML
e.g.
http://jmeter.apache.org/usermanual/component_reference.html#postprocessors(Beanshell
, BSF post processors or the java sampler )
+
http://nekohtml.sourceforge.net/ or http://jsoup.org/

The question is why do you want to do this? (or this might not be the
easiest way) If there is information you need from the HTML response the
Regex/CSS/JQuery post processors work most of the time.There are only some
advanced use cases where parsing the HTML helps...


On Fri, Jan 10, 2014 at 6:51 AM, KIRAN <rk...@gmail.com> wrote:

> Hi,
>
> Is there a way to read and parse HTML source code using JMeter?
> If so, please explain me how to achieve this.
>
> --
> Thanks,
> Kirna
>