"Struggling with Playwright locators—any tips for writing stable selectors?"
Hey y'all!
I’ve been using Playwright locators for a bit now, but sometimes my tests flake because the selectors break. Like, one day it works, next day—poof! Gone.
Any pro tips for making Playwright locators more reliable? I’ve tried stuff like `getByRole` and `getByText`, but still get hiccups.
Also, is it better to chain locators or keep ‘em simple? Feels like I’m overcomplicating things sometimes lol.
Thanks in advance! 🚀
Hey y'all!
I’ve been using Playwright locators for a bit now, but sometimes my tests flake because the selectors break. Like, one day it works, next day—poof! Gone.
Any pro tips for making Playwright locators more reliable? I’ve tried stuff like `getByRole` and `getByText`, but still get hiccups.
Also, is it better to chain locators or keep ‘em simple? Feels like I’m overcomplicating things sometimes lol.
Thanks in advance! 🚀
