XPath contains text: Finding xPath for an element with text
The problem you are facing is because: [contains(text()='Some text')]To get rid of this error try to change it to the following:- [text()[contains(.,'Some text')]]Here the outer [ ] are a conditional that operates on each individual node in that node you can set function text()as a selector that matches all of the…
Answered Apr 5, 2021 · 2.2K Views Read answer →