Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97796

how to resolve xpath for selenium throws org.openqa.selenium.InvalidSelectorException

$
0
0

How to resolve Method threw org.openqa.selenium.InvalidSelectorException exception when we have the xpath has //td/text()[following-sibling::br and contains(.,'text')]

Edited: My bad, misspelled. I need to select text1 only to identify the object but when I use the above XPath then selenium throws the exception. If I use //td[text='text1'] this identifies full td element. Once I find text1 then i need to find checkbox inside the label.

labelText is unique and text1 or text2 is unique.

Dom object looks like below.

<td><label>labelText<input></label>"text1"<br><label>labelText<input></label>"text2"<br></td>

Viewing all articles
Browse latest Browse all 97796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>