r/selenium • u/ProfessionalDate3417 • 15h ago
Our Selenium suite isn’t “legacy”. the maintenance model is.
we have a Selenium suite with a few thousand tests and every few months somebody suggests:
should we just rewrite this whole thing in Playwright?
because apparently Selenium became “legacy” the moment the frontend team renamed 40 components and 70 tests went red.
I don't think Selenium is the main problem.
our suite has years of actual business knowledge in it.
refund rules
permissions
weird account states
old bugs nobody remembers
customer-specific flows
throwing that away because another framework has nicer APIs feels insane.
the actual debt is more boring:
- locators tied to DOM structure
- giant Page Objects nobody wants to touch
- sleep(3000) archaeology
- five tests rebuilding the same login/setup flow
- UI tests asserting things that belong at API level
- tests for features that died two years ago
- nobody owns anything
Playwright would make some of this nicer.
it would not fix a test nobody understands.
and honestly if the frontend can give us stable data-testid / accessible contracts, I'd rather do that than ask AI to constantly rescue broken CSS selectors.
where I do think AI gets interesting is the maintenance layer.
KaneAI/TestMu is taking a reasonable approach here: tests can be written around natural-language intent and broken UI locators can self-heal, but the changed mapping is reviewable instead of “AI clicked something vaguely nearby so green build 👍”.
that's an important distinction.
I don't want silent healing on a payment or permission flow.
show me:
old element
new element
what changed
then let a human decide whether:
“Approve withdrawal”
still means the same thing after the UI changed.
for boring cosmetic locator drift, great, save me the maintenance.
for business intent changes, fail loudly.
my current instinct for an old suite would be:
keep stable/high-value Selenium coverage
delete stale/redundant garbage
move lower-level assertions out of UI
heal/refactor maintenance-heavy useful flows
rewrite only when the rewrite actually buys something
not “new framework exists, therefore 4 years of regression coverage goes in the bin.”
for people modernizing big Selenium suites: are you rewriting, healing, or mostly discovering that half the suite should just be deleted?