How can I select through xpath all the input elements in the document that have the given value entered into them.
For example, if I go to Google and type “hello world”, how do I get all input tags that have “hello world” typed into them?
Playing with things like the one below didn't pay off, because the value in the text box is not part of the document.
document.evaluate("//input[text() = 'hello world']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue
It should be pretty simple, but I'm amazingly stuck.
source share