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

16 Replies, 1245 Views

OP reply:
Whoa, thanks for all the ideas! Tried `text=` in Playwright and it kinda worked, but the element’s text changes sometimes.

Follow-up: Anyone know how to make `contains(text())` more stable? Like, ignoring whitespace or case?

Also, `nth-child` scared me—DOM changes a lot. Maybe I’ll test `getByRole` next.

Y’all saved my sanity today. 🙏

Messages In This Thread



Users browsing this thread: 1 Guest(s)