In JMeter, how do I save a thread variable in Javascript and reference it from Beanshell on the very next step OR the next threadgroup?
I am using the WebDriver sampler plugin and the WebDriver steps seem to be required to be Javascript commands. I wrote a WebDriver code block in Javascript that goes to a website and gets a cookie value.
- How do I set the thread-group variable at the end of the Javascript WebDriver step.
- How do I retrieve this value from a Beanshell step.
I have tried various things and haven't got anything to work. For example vars.put works in the WebDriver sampler but props.put says 'props' is not defined. The debug sampler shows that my JMeter property was set wonky like this:
"varName"= varName
After setting it in Javascript like this:
props.put( 'varName', varName )
And that doesn't look right AT ALL.