How can I use XPath to find elements with 'like text' matching? or What's the best way to write XPath

16 Replies, 1459 Views

Pro tip: Combine `contains()` and `not()` to exclude stuff.

Like `//div[contains(., 'error') and not(contains(., 'warning'))]`.

For testing, [XPath Helper](https://chrome.google.com/webstore/detai...lgjoejdpjl) is a lifesaver.

Messages In This Thread



Users browsing this thread: 1 Guest(s)