I’ve been dealing with this for years—you update a website’s CSS classes and suddenly half your playwright tests fail. It’s not just annoying; it tanks productivity when you’re trying to move fast.
Recently I started experimenting with converting plain-language test intents into ready-to-run playwright automations instead of hand-coding everything. The idea is simple: describe what you actually want to test in plain English, and let an AI generate the playwright code. Sounds like magic, but it actually works.
What I noticed is that when you describe the intent (“log in with valid credentials and verify the dashboard loads”) instead of hard-coding selectors, the generated workflow is more resilient. It’s not tied to specific class names or IDs. When the UI changes slightly, the logic still holds up because it’s more semantic.
I tested this on a few flows—login, checkout, form submission—and the maintenance overhead dropped significantly. No more hunting through the DOM to find which selector broke this time.
Has anyone else tried this approach? Are you still maintaining playwright tests manually, or have you found ways to make them less fragile when sites get redesigned?