I have JSON
responce
{
"sessionName":"eL7tYgxhYh",
"imageSrc":"/Common/CaptchaImage/**eL7tYgxhYh**?t=636573960197174426"
}
How I can get a random value string "eL7tYgxhYh"
in href by JSON Path Extractor with JMeter?
You cannot achieve this using JSON Extractor as it can only deal with JSON Objects, i.e. you can easily get full value of the imageSrc
attribute, but not more.
I would recommend switching to Boundary Extractor instead, the relevant configuration would be something like:
href
CaptchaImage/
?
That's it, the "interesting" value should be now extracted and you should be able to refer it as ${href}
where required
Demo:
More information: The Boundary Extractor vs. the Regular Expression Extractor in JMeter