I want to iterate over a set of table rows from a html response (e.g. each row contains data that I want to use in another request). To do this I have set up a variable called COUNTER and I have setup an XPath Extractor with the XPath Query field set to
//table//tr[${COUNTER}]/td[0]
However this fails to obtain a result irrespective of the value of COUNTER. If I replace ${COUNTER} with a numeric value, e.g.
//table//tr[4]/td[0]
it works as expected.
The following bug indicates that this functionality should be in 2.5.1 https://issues.apache.org/bugzilla/show_bug.cgi?id=51885 but it doesn't work for me in 2.5.1 or 2.6
Using variables in XPath expressions must be very useful in jmeter but I can't find any talk of how to do this on the web. I'm open to alternative suggestions but Regular Expressions doesn't immediately appear to be the right solution.