Let's say I want to check if "xpath html value" is equal to some text in a website.
html/body/div/div/table/tbody/tr/td value = "some text"
How do I get it?
You can use document.evaluate to do this:
var value = document.evaluate('html/body/div/div/table/tbody/tr/td', document.documentElement, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.textContent;
Have a look here for some more information on how to set up an iterator and iterate through a number of nodes, in case you need to get the value of more than just one td in the tr.