You can set a variable:
Name Value
title Sr.
Then user regular-expression extractor:
Reference name: result
Regular Expression: <option value="(\d+)">${title}</option>
Template: $1$
Match No.: 1
Finally, you can use ${result_g1} to get 31.
----- Original Message -----
From: "Rajiv Nanduani" <[email protected]>
To: "JMeter Users List" <[email protected]>
Sent: Wednesday, February 23, 2011 10:03 AM
Subject: Re: How to extract value
use regular-expression extractor
On Wed, Feb 23, 2011 at 1:34 AM, Anil <[email protected]> wrote:
I have something on my screen.
<select name="suffix" id="Suffix" class="txtField">
<option value="29"></option>
<option value="30">Jr.</option>
<option value="31">Sr.</option>
<option value="32">I</option>
<option value="33">II</option>
<option value="34">III</option>
</select>
All the values like 29,30,31...34 are dynamic. These could be different
in
next load. So I can not hardcode any value for suffix. I have to extract
this from HTML. So if I want to set "Sr." in my script, then how to
extract
corresponding value 31 to send as post parameter.
--
View this message in context:
http://jmeter.512774.n5.nabble.com/How-to-extract-value-tp3396086p3396086.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
RAJIV KUMAR
<http://rajivkumarnandvani.wordpress.com/>
<http://learnqtphelp.blogspot.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]