Not able to find the xpath for the text having &nbsp

723 views
Skip to first unread message

sri ram

unread,
May 16, 2021, 10:06:43 AM5/16/21
to Selenium Users
Hi can any one help me with the following html code to find the xpath using it.

<text class="blocklyText" y="12.5" transform="translate(35,5)">When&nbsp;the&nbsp;first&nbsp;activation&nbsp;is&nbsp;triggered</text>

I need find the xpath for the text having &nbsp values in it. Can anyone help me?


Thanks in Advancespace.PNG

venkatesh iyengar

unread,
May 16, 2021, 11:12:04 AM5/16/21
to seleniu...@googlegroups.com
Try this
use contains in the xpath like "//text[contains(text(),' &nbsp ' ] "



Regards,
Venkatesh

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ef7549eb-c760-45b8-8eec-705279507cbcn%40googlegroups.com.

sri ram

unread,
May 22, 2021, 1:34:14 PM5/22/21
to Selenium Users
Hi Venkatesh,

I have tried the above xpath way before. there should not be &nbps and it should filtered out while finding the xpath and it is difficult to find xpath with &nbps in between the text. Is there any alternative solution?

with regards,
Sriram M

SuperKevy

unread,
May 24, 2021, 10:07:18 AM5/24/21
to Selenium Users
Reply all
Reply to author
Forward
0 new messages