The Great Selenium-to-Modern Migration: A Practical Guide
Most Selenium migrations fail by converting 3,000 scripts one to one. The method that works: audit the journeys, retire the dead weight, regenerate the rest. 90 days, no coverage dip.

Selenium earned its place. For two decades it was the honest answer to browser automation, and the largest installed base in testing proves it. But the math that made a Selenium suite an asset has been flipping team by team: when your engineers spend more hours repairing tests than writing them, the suite has quietly become a liability with version control.
The migrations that follow usually fail the same way: a heroic attempt to convert thousands of scripts one-to-one into a new framework, which faithfully ports a decade of duplication and dead weight into modern syntax. Here is the method that works instead.
When Is It Time to Leave Selenium?
The signal is a single ratio: maintenance hours versus authoring hours. When keeping existing tests alive consumes more time than creating new coverage, the suite is net-negative and every quarter of delay costs more than the migration would. Three secondary signals confirm it:
- Coverage has been flat for two or more quarters while the application kept growing
- The team re-runs failures by reflex because most red marks are selector noise, not bugs
- The engineer who understood the framework layer has left, and nobody fully owns it now
If you want the financial version of this argument, the TCO math is laid out in our ContextQA versus Selenium comparison: a mid-size team commonly spends $250,000 to $600,000 a year in engineer time keeping a “free” suite alive.
The 1:1 Conversion Trap
The instinctive plan is to convert every existing script to the new stack. It fails for three reasons:
- You port the debt. Years of duplicated tests, obsolete flows, and copy-pasted patterns arrive intact in the new framework. Same weight, new syntax.
- You measure the wrong finish line. “All 3,000 tests converted” is not the goal. “The journeys that matter are protected” is. Those are very different amounts of work.
- You stall. Conversion projects big enough to need a spreadsheet are big enough to be deprioritized. Most die at 40% done, leaving two half-suites to maintain. The worst of both worlds.
The Flow-Based Method
Stop thinking in test files. Think in user journeys.
Step 1: Inventory what the suite actually protects
Map your 3,000 tests to the user journeys they cover. This exercise is always revealing: large clusters of tests protecting the same three flows, entire features with zero coverage, and a long tail of tests nobody can explain.
Step 2: Sort into three buckets
- Migrate: tests protecting critical, current journeys. Typically 30% to 50% of the suite.
- Retire: duplicates, tests for removed features, tests that assert nothing real. Typically 20% to 40%. Deleting these is progress, not loss.
- Keep for now: stable, passing, low-maintenance tests that can keep running in Selenium until their area migrates naturally.
Step 3: Regenerate, do not translate
For every journey in the migrate bucket, generate fresh coverage on the new platform instead of translating old code. AI test generation maps the application and produces the tests directly, which is faster than conversion and sheds the accumulated cruft. Teams doing this report the regenerated suite covers more edge cases than the original, because generation enumerates paths humans never listed. Our issue on AI test generation explains why.
Step 4: Run parallel, retire on a date
Keep Selenium running alongside the new coverage while confidence builds, then set a firm retirement date per area. The 200-person SaaS company in our case study flagged this as their one regret: they ran both suites two months longer than needed, doubling pipeline time out of caution that the data no longer justified.
The 90-Day Plan
- Weeks 1 to 2: journey inventory and the three-bucket audit. Retire the dead weight immediately.
- Weeks 3 to 6: regenerate the top five critical journeys on the new platform. Wire them into CI alongside Selenium.
- Weeks 7 to 10: expand to the remaining migrate-bucket journeys. Start retiring Selenium areas as replacements prove out.
- Weeks 11 to 13: parallel-run the last critical areas, hit the retirement dates, and hold a post-migration review against the baseline metrics you captured in week 1.
Migrating From Something Older Than Selenium?
If your estate is UFT rather than Selenium, the method is the same but the clock is louder: Microsoft’s phased removal of VBScript from Windows puts a hard expiry date on every UFT One suite. The dedicated playbook is our UFT migration guide.
The Bottom Line
A Selenium migration is not a rewrite project. It is an audit that deletes what you never needed, a regeneration that covers what you actually use, and a parallel run that retires the old suite without betting a release on the transition. Ninety days, no coverage dip, and the maintenance treadmill stays behind you.
See what AI-native testing actually looks like
Spin up an AI agent on your own app, watch it generate and self-heal tests, and read the root cause analysis for yourself.