I have a range like this:
<span> <span>foobar</span> <span>thisisatest</span> </span>
I am trying to use xpath to find a span with "thisisatest" in it.
I tried this:
span[text()='thisisatest']
and it does not seem to work.
You are absent //at the beginning of XPath.
//
//span[text()='thisisatest']
You can try the following:
span[span= "thisisatest"]
All elements <span>containing at least one child <span>with thisisatest value.
<span>
Hope this helps!