When I right-click and copy XPath this is what I get


The information I want to gather is 119 this is the price of the asset I want to buy. Whenever i put this into my XML it just returns me N/A I can't seem to figure out how to pick that row of information.

Thanks in advance

Code i try to get information out of

  • How does this relate to software testing? Can you bring more test context around this question?
    – Lee Jensen
    Commented Oct 20, 2021 at 15:08
  • please add html as code not as image
    – PDHide
    Commented Oct 20, 2021 at 20:17

2 Answers 2


Try this xpath

//*[text() = "119"]
  • did not help xD
    – Zplinter
    Commented Oct 20, 2021 at 16:17
  • Hm.. Maybe try //*[@class = 'PriceDiff Negative' and text() = '119] or replace text() with @value Commented Oct 20, 2021 at 16:59
//*[string() = "119"]

try string() method as text() will return only text nodes and not the entire text content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.