A generational shift in test infrastructure quietly closed out this spring. The 2026 developer surveys agree: Playwright is now the most-used browser automation framework at 45.1%, Selenium is second at 22.1%, and Cypress sits at 14.4% where it has hovered for nearly three years.
For the first time since Selenium's launch in 2004, the de facto standard for driving a browser from code is something other than Selenium. Twenty-two years of incumbency, ended in a calendar year. If you have written tests since 2015, this is the equivalent of jQuery losing to React - the gap is too wide for the trend to reverse.
The download chart that says it all
Surveys can be argued with. Download counts cannot. Playwright now ships roughly 30 million weekly npm downloads against Selenium-WebDriver's 2.4 million and Cypress's 6.5 million.
Both crossover dates matter. Playwright passed Cypress in late 2023 as the React ecosystem standardised on it, then passed Selenium-WebDriver on npm in early 2024 as the enterprise stacks started porting. Neither line has recovered. The shape is a one-way migration, not a fashion cycle.
Why Playwright's architecture wins
The shift is not about marketing. It is about a measurably better architecture, and it has been measurably better since Microsoft open-sourced it in 2020.
Selenium speaks to the browser through a JSON Wire protocol that hops through a separate driver process (chromedriver, geckodriver). Every click is HTTP-marshalled through an intermediate binary before it reaches the browser. Playwright speaks the browser's native protocol directly over a persistent WebSocket. The hop disappears. Round-trip latency drops from ~120ms to ~38ms - about 3.2× faster in parallel execution benchmarks.
Three other things fall out of that architecture for free.
Auto-wait. Playwright knows the DOM's state because it is on the protocol channel. It will not click until the element is clickable, attached, visible, and stable. Selenium teams write WebDriverWait by hand and usually get it wrong. Benchmarks put Playwright's flake rate roughly 60% lower than Selenium's on equivalent suites.
Parallel without a grid. Selenium teams stand up Selenium Grid - or pay BrowserStack - to run more than one browser at once. Playwright spins up isolated browser contexts inside one process and parallelises across CPU cores by default. The grid was load-bearing infrastructure for twenty years; now it is a thing you stop needing.
A locator API that doesn't rot. page.getByRole('button', { name: 'Sign in' }) survives CSS renames, component restructures, and framework migrations. CSS selectors do not. This matters more than the latency numbers, because the 40% test-maintenance tax is mostly selector rot.
Why this matters for AI test generation
Here is the part most coverage of the trend misses. The architecture that makes Playwright better for humans also makes it the only sane target for AI test generation.
When an AI agent writes a test, it picks locators, timings, and assertions against an API it learned from training data. Playwright's deterministic, role-based, auto-waiting API gives the model a much narrower target than Selenium's bag of By.css() / By.xpath() / WebDriverWait combinators. Narrow target, fewer hallucinations. The pattern that makes Playwright lower-maintenance for humans makes its generated specs lower-maintenance too.
Screenshot stability is the other half. Visual regression on Selenium is a coin flip - the driver hop introduces enough timing jitter that the same page snapshots different pixels run to run. Playwright's direct protocol plus stabilisation primitives produce snapshots two CI runs an hour apart can actually compare.
None of this fixes the harder problem: AI today writes plausible-looking Playwright code but cannot validate business intent. A model can produce a spec that exercises a checkout flow. It cannot tell you whether the spec exercises your checkout flow, with your promotion rules, your tax logic. As we covered in the human-in-the-loop agentic dev cycle, the verdict has to live with a human. A better generation surface does not remove the seam - it makes everything below the seam cheaper.
The 2026 AI testing numbers say the same thing: 84% of developers use AI but only 33% trust the output. The trust gap is not closed by switching frameworks. It is closed by giving the human a sortable diff queue and three buttons.
Selenium isn't dead, but it's legacy
Calling Selenium “dead” would be wrong. Selenium is still the only sane choice for several real workloads - legacy-browser support (IE, Edge Legacy, old Safari), and polyglot teams writing in Ruby, C#, Kotlin, or PHP, where it has the only first-class bindings. WebDriver BiDi, which Selenium pushed as a W3C standard, is even converging with the protocol Playwright uses under the hood.
What has happened is that Selenium has become a specialist tool: the answer for legacy support, polyglot teams, and stacks that already paid for the grid. For new greenfield work in 2026, almost nobody is starting on it.
The Cypress middle ground
Cypress never lost - it just stopped growing. Its 14.4% share is roughly where it sat in 2023. The in-browser execution model is elegant: the test runs in the page's JS runtime, debugging is exquisite, no network hop. But the same model bakes in three limits: same-origin only, no native multi-tab, parallelism that effectively requires the paid Cypress Cloud. Not deal-breakers for small suites; deal-breakers for the size a team accumulates after eighteen months. Teams that hit the wall migrated to Playwright; new teams looked at the wall and started on Playwright. The line went flat.
What this means for visual regression
Lastest was built on Playwright from day one, and the bet is paying off because the trajectory is now consensus. The Play Agent generates Playwright specs, runs them through Playwright workers, captures snapshots through the direct protocol, and diffs them through three engines. We placed the bet in early 2024; today we no longer have to explain it.
Each layer below the seam is mechanical. The seam is the only place trust gets installed. Playwright's deterministic surface is what makes the mechanical layers reliable enough that the human can spend three minutes per merge instead of thirty - and that, not the framework choice, is what ships features. If you are still running visual regression on Selenium or a Cypress plugin, the migration is no longer optional. The flake floor is lower, the AI surface is better, every supporting tool points the same way.
Try it on your own suite
Lastest is open source, runs in Docker, generates Playwright specs from a URL, and adds the human-verdict seam on top. A hundred-spec run takes about three minutes in CI.