Using XPATH to search text containing  

0
0

I use XPather Browser to check my XPATH expressions on an HTML page.

My end goal is to use these expressions in Selenium for the testing of my user interfaces.

I got an HTML file with a content similar to this:

<tr>
<td>abc</td>
<td>&nbsp;</td>
</tr>

I want to select a node with a text containing the string “&nbsp;“.

With a normal string like “abc” there is no problem. I use an XPATH similar to //td[text()="abc"].

When I try with an an XPATH like //td[text()="&nbsp;"] it returns nothing. Is there a special rule concerning texts with “&” ?

  • You must to post comments
Showing 0 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website