You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jonathan Chard <jo...@lorika.com> on 2002/08/09 12:35:16 UTC

HTML Link Parser

Hi all,

Does anyone have a copy of the Poll Example described in the docs for the above component? I can't work out what to put in the http request before the link parser node ('Setup Poll' in the screenshot in the docs), so that the link parser will pull out the form fields I want to put in the next request.

Thanks,

Jon Chard.

Re: HTML Link Parser

Posted by Mike Stover <ms...@apache.org>.
There is no actual poll example .jmx file or web site to run it against.  The example is meant to 
show where to put the HTML Link Parser and which HTTP Request it will modify.  It also shows 
the simple regular expression in the HTTP Request that will be replaced with values found on 
the response page from the previous request.

The 'Setup Poll' HTTP Request is irrelevant.  It could be anything, provided the server's 
response to that request is a page of HTML that contains the form elements that the next 
request is looking for.  If we look at the Request labelled 'Do Poll', we find that it is looking for 
a form (ie method is POST), with an action of 'record_poll.jsp', and at least two form elements 
called 'poll_name' and 'poll_choice'.

For example, if the page returned from the 'Setup Poll' request looked like:

<html><head><title>Do poll</title></head>
<body>
Select your favorite color:
<form action="record_poll.jsp" method="POST">
<input type="hidden" name="poll_name" value="color_poll"/>
<input type="radio" name="poll_choice" value="red"/>Red<br>
<input type="radio" name="poll_choice" value="green"/>Green<br>
<input type="radio" name="poll_choice" value="blue"/>Blue<br>
<input type="radio" name="poll_choice" value="yellow"/>Yellow<br>
<input type="radio" name="poll_choice" value="purple"/>Purple<br>

<input type="submit"/>
</form>
</body></html>

Then the 'Do Poll' request would have the '.*' value replaced with one of Red, Green, Blue, 
Yellow, or Purple - chosen at random each time through the test.

-Mike

On 9 Aug 2002 at 11:35, Jonathan Chard wrote:

> Hi all,
> 
> Does anyone have a copy of the Poll Example described in the docs for the above component? I can't work out what to put in the http request before the link parser node ('Setup Poll' in the screenshot in the docs), so that the link parser will pull out the form fields I want to put in the next 
request.
> 
> Thanks,
> 
> Jon Chard.
> 



--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>