jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casadonte, Joe" <JCasado...@glog.com>
Subject decoding the value of a variable -- javascript?
Date Mon, 01 Nov 2004 16:32:23 GMT
I have a regular expression extractor that grabs a PK value for me, and
stores it in ${pk}.  Sometimes this value has a space in it, which is
encoded (e.g. "HELLO%2BWORLD").  When I send the value back, I need to send
it back decoded (e.g. "HELLO WORLD").  I've been fooling around with the
__javaScript function all morning and I can't figure out how to get it to
work on the value of a jmeter variable.  Is this possible?

This works:

   ${__javaScript(('HELLO%2BWORL'.replace('%2B'\, ' ')),xpk)}

but this does not:

   ${__javaScript((${pk}.replace('%2B'\, ' ')),xpk)}

Nor has any variation on it that I can think of.  Is there a way to send the
value of a jmeter variable through a javascript function?  Or is there some
other method of transforming a string that would work?  Thanks as always for
the help!

-- 
Regards,


joe
Joe Casadonte
jcasadonte@glog.com

1016 West Ninth Avenue
Suite 300
King of Prussia, PA  19406
610-491-3315

---------------------------------------------------------------------
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