Hey! Been there—super annoying when elements have no attributes. One trick I use is `document.evaluate()` with XPath axes like `following-sibling` or `ancestor`.
Also, Playwright’s `text=` selector is clutch for text-based matching. Example: `page.locator("text='Submit'")`.
If the element’s position is static, `nth-child` can work, but yeah, it’s brittle. Worth a shot though!
Tool rec: Check out [ChroPath](https://autonomiq.io/chropath/) for visualizing XPath/CSS in-browser.
Also, Playwright’s `text=` selector is clutch for text-based matching. Example: `page.locator("text='Submit'")`.
If the element’s position is static, `nth-child` can work, but yeah, it’s brittle. Worth a shot though!
Tool rec: Check out [ChroPath](https://autonomiq.io/chropath/) for visualizing XPath/CSS in-browser.
