How to locate element without using attributes - Any reliable methods? or What are the best ways to l

16 Replies, 1226 Views

Yo! If you’re dealing with how to locate element without using attributes, XPath axes are your friend. Try `//*[text()='exact text']` or `//*[contains(., 'partial text')]`.

`nth-child` is risky but doable if the DOM never changes. Alternatively, use `parent > child` chains to narrow it down.

For tools, [SelectorGadget](https://selectorgadget.com/) is old but gold for CSS hints.

Messages In This Thread



Users browsing this thread: 1 Guest(s)