Given this html:
<input id="test" value="my text" />
it is easy to get a handle on the input element with xpath. Something like:
input[@value="my text"]
But what if the original html looks like this:
<input id="test" />
It still has 'my text' in it if you look in the browser - because this has been added with javascript like this:
document.getElementById('test').value = 'my text';
In the fiddle you can see that the input field has the word(s) 'my text' in it but does not have a value attribute: https://jsfiddle.net/justinwyllie/5dsxa8mc/
How can I select this element? Just xpath - no jQuery.