Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I search for element with   symbol in selenium

First I thought that element is empty, but I found out it contains:

<div class="Tips">&nbsp;</div>

which is NO-BREAK SPACE. I wanted to catch this div by xpath but I am not able to do so. What xpath do you use for

text()='?'
like image 927
Pavol Travnik Avatar asked Sep 11 '17 12:09

Pavol Travnik


Video Answer


1 Answers

I found out, that you have to use:

//div[@class='Tips' and text()='\u00a0']
like image 176
Pavol Travnik Avatar answered Sep 17 '22 23:09

Pavol Travnik