jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: help with Javascript function
Date Tue, 12 Apr 2005 23:30:05 GMT
On 4/12/05, Dantes, Ed <Ed.Dantes@gd-ais.com> wrote:
> Hi all,
>     Just load testing my web application, which is mainly in HTML.
> There is however some JavaScript embedded into it.
> So load testing the app is fine up until I get to the JavaScript code,
> which of course shows nothing. The following javascript code shows this:
> 
> var tmenuItems =
> [
>   ['H4607243'<input type = "hidden" value="21728476"
> name="key">,'blahblah','blahblah']
> ];
> 
> I need to extract the 'value' out of there so I can equate it to the key
> and append to the path

This is a job for the regular expression (regex) extractor:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor

To extract the value, you can use the following regex:

value="(\d+?)"

This will match the digits.

If value appears elsewhere on the page, you will need to add extra
context before and/or after to ensure you only match the correct
value.

> How would I go about doing that using the javascript function?

See above; javascript is not suitable here.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message