I got this html :
<tr>
<td>
Some
<strong>
text
</strong>
<em>
and more
</em>
</td>
...
</tr>
I need to locate my td element with this text Some text and more. I know that I can get this text with this XPath expression :
//td//text()
But I can not find a solution to locate td element. I try this :
//td[//text()='Some text and more']
but I get errors. Do you know a working XPath expression for that ?
Firstly, XPath uses forward slashes, never backslashes.
Secondly, I believe this may be the XPath you need:
Could you give that a try?