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

16 Replies, 1243 Views

Formal answer: When traditional methods fail for how to locate element without using attributes, consider:

1. Relative XPath (e.g., `//div[@class='parent']/div[2]`).
2. JavaScript’s `querySelector` with `:has` (if supported).
3. Visual locators like Applitools if UI testing.

Resource: [MDN’s XPath guide](https://developer.mozilla.org/en-US/docs/Web/XPath).

Messages In This Thread



Users browsing this thread: 1 Guest(s)