I have a html page containing userIds of students. I need to extract all the userId values from this html page and use them in a parameter of JMeter HTTP request..
For example i have following data on htm page.
<input type="checkbox" StudentID="1503"
<input type="checkbox" StudentID="1504"
<input type="checkbox" StudentID="1505"
so on..
The value I need to send in parameter is like this selectedIds= 1503,1504,1505 and so on..
Now I am not sure how I can get the result that i need to send in my second request. I can extract & use one value at a time but could not figure out how to get values like I require "1503,1504,1505..."
Currently my Reg Exp extractor is like this
Reference Name: myTestVar Reg Expression: StudentID="(.+?)" Template: $1$ MatchNo: -1
In my second request I am referencing to variable ${myTestVar}
Please guide what else I need to do to get the results in desired way..
"1504,1505,1506"
You can use BeanShell Postprocessor:
Or if you are using Regex Extractor then also in Beanshell Postprocessor: