xpathjmeterextractor

Use XPath in JMeter to get attribute value


Below is a sample response from JMeter tool.

<input name="requestId" type="hidden" value="-1859748216"/>

I try the following XPath //input[@name='requestId'], but it doesn't work, I would like to take only the numeric value -1859748216

1


Solution

  • You need to get the value attribute using /@value

    //input[@name='requestId']/@value
    

    Prefer using newer/improved XPath2 Extractor over XPath Extractor