Playwright has become the default choice for end-to-end browser testing across a lot of Australian engineering teams, and Claude Code turns out to be genuinely good at the two hardest parts of E2E testing: writing the first version of a test that actually covers the real user flow, and fixing the tests that break every time the UI changes even slightly, which is where most teams' E2E suites quietly rot.
Why E2E suites usually end up neglected
This compounds fastest on teams shipping frequent UI changes, since every redesign or component-library upgrade touches selectors across dozens of tests at once, and fixing them all by hand competes directly against whatever feature work is actually on the sprint board that week. Engineers under deadline pressure make the entirely rational short-term call to skip the broken test rather than fix it properly, and that one skipped test becomes five, then twenty, within a couple of quarters.
E2E tests are expensive to write well and expensive to maintain, because a Playwright test that selects an element by its exact CSS class breaks the moment a designer tweaks that class name, even though the underlying user flow hasn't changed at all. Most teams write a reasonable E2E suite early, then watch it slowly become more trouble than it's worth as selectors drift and nobody has the appetite to fix a dozen brittle tests every sprint, until eventually the suite gets skipped in CI and nobody notices for months.
Claude Code drafting new Playwright tests directly from a feature's actual user flow, not a generic template
Claude Code triaging a failed CI run to distinguish a genuine regression from a selector that just needs updating
Automatic conversion of brittle CSS-class selectors to more stable role- and text-based locators
Flaky-test detection across repeated runs, flagging tests that fail intermittently for reasons unrelated to the actual feature
The workflow that keeps a suite healthy long-term
The setup that holds up over time treats Claude Code as a standing maintainer of the suite, not just a one-off generator: a scheduled or CI-triggered pass reviews every failing test, distinguishes a real regression from a stale selector, and drafts the fix for the latter automatically, with a human reviewing and merging rather than every failure landing on an engineer's desk to triage manually from scratch. This is a meaningfully different posture from asking Claude Code to write tests once and never touching the workflow again.
A Sydney logistics software company had let their Playwright suite drift to the point where forty percent of tests were failing on selector drift rather than genuine bugs, and engineers had started ignoring CI failures entirely because they couldn't tell real regressions from noise. Setting Claude Code up to triage every failure and auto-draft selector fixes for review brought the suite back to a state engineers actually trusted within three weeks, and the QA lead estimated it avoided a planned $18,000 contractor engagement that had been quoted to manually rewrite the suite from scratch.
Getting locator strategy right from the start
Tests generated against stable locators, Playwright's own role and text-based selectors rather than implementation-specific CSS classes, survive UI refactors that would otherwise break a class-based suite entirely. Instructing Claude Code explicitly to prefer these selector types when drafting new tests, rather than whatever the browser's inspector suggests first, is a small setup decision that pays off every time the frontend team ships a redesign.
Setting the triage cadence
Running the triage pass on every CI failure works for a small suite, but teams with a few hundred E2E tests get better signal running it as a scheduled daily pass instead, batching the day's failures into one triage report rather than interrupting engineers with individual Slack pings for each flaky test. That batching also makes genuine patterns easier to spot, like a single flaky test failing intermittently across many runs, which is worth fixing properly rather than re-triaging every time it happens to fail again.
Where human review still matters
Auto-generated selector fixes should still go through normal PR review, not merge automatically, because a selector fix that quietly changes what the test actually checks, rather than just how it finds the element, can mask a genuine regression under the appearance of a passing suite. The time saved is in triage and drafting, not in removing the human checkpoint entirely.
What this isn't
This is distinct from unit or integration test generation, which follows different patterns and different tooling; E2E specifically means real browser flows through Playwright, and the maintenance problem this solves is specific to that layer of the test pyramid.
Automata AI sets up Claude Code and Playwright maintenance workflows for Australian engineering teams whose E2E suite has quietly stopped being trusted. Get in touch via /contact and tell us your current pass rate, we'll scope the triage setup from there.



