Why More Companies Are Switching from Selenium to Playwright in 2026

Why More Companies Are Switching from Selenium to Playwright in 2026

29 June 2026 3:33 MIN Read time BY Harshit Gupta

Playwright vs Selenium has become one of the biggest discussions in test automation. A QA lead I worked with last year had a Selenium suite she was quietly ashamed of. It took the better part of an hour to run, and it still lied to her about a third of the time…

The day a release slipped because the suite had cried wolf one time too many, she stopped defending it. Six weeks later the whole thing was running on Playwright.

Her story isn’t unusual, and that’s the point. The Selenium-to-Playwright move stopped being a niche, early-adopter thing a couple of years ago. In 2026 it’s closer to the default — and the reasons are more interesting than the “Playwright is faster” headline everyone leads with.

First, is the shift actually real — or just loud?

It’s real, and you don’t have to take a vendor’s word for it. The cleanest signal is the State of JS survey, which asks developers what they actually use at work, not what they’ve heard of. In the 2024 edition Playwright came back with 3,674 professional users to Selenium’s 1,130 — and Cypress, the other name people throw around, sat at 3,603. For a tool that didn’t exist before 2020, beating the framework that defined browser automation for fifteen years is not a small thing.

The trend didn’t stall after that, either. In TestGuild’s Automation Guild 2026 survey, founder Joe Colantonio reported that — for the first time ever — Playwright is the tool testers most want training on: “Not tied, not close. I mean, dominant.” That’s a leading indicator worth watching. What a workforce scrambles to learn this year is usually what it’s building with a year or two later.

The package registries tell the same story. By the public npm trends numbers, Playwright’s weekly downloads now sit well above selenium-webdriver — not by a nose, by a wide margin. (I’m deliberately not quoting a precise multiple here; the figures floating around blog posts range wildly and most don’t survive a fact-check. The direction, though, isn’t in dispute.)

So the trend is genuine. The more useful question is why — because “switch to the popular thing” is how teams end up with expensive regrets.

Playwright vs Selenium: What Selenium Actually Costs You

Selenium isn’t bad software. It’s old software, and it was designed for a web that doesn’t exist anymore.

The deepest problem is waiting. Selenium expects you to know when the page is ready. You write explicit waits, you guess at timeouts, and when you’re in a hurry you drop in a hard sleep and move on. BrowserStack’s own comparison puts it plainly: Selenium “often requires explicit waits to avoid flakiness.” Every one of those waits is a small bet against a race condition, and across a few hundred tests you lose some of those bets every single run.

That’s where the rot starts. Flaky tests don’t just fail — they teach your team to ignore failure. Once “re-run until green” becomes the culture, your suite has quietly stopped being a safety net and become a slot machine. I’ve watched genuinely good engineers ship real bugs straight past a green pipeline because the green had stopped meaning anything months earlier.

Then there’s the maintenance tax. Parallel runs mean standing up and babysitting Selenium Grid. Cross-browser coverage means wrangling driver versions. None of it is impossible. It’s just a steady drip of work that doesn’t show up on any roadmap and never quite goes away.

What changed the math in Playwright’s favour

Playwright’s pitch is that most of that drip simply isn’t there.

It waits automatically. Before it clicks, types, or asserts, it checks the element is actually there and actionable, and retries until it is — as Wikipedia’s summary and Playwright’s own docs describe, automatic waiting is a core design goal, not a bolt-on. The hard sleeps disappear, and so does most of the flakiness that came with them.

It drives Chromium, Firefox, and WebKit through a single API, with bindings for JavaScript/TypeScript, Python, C#, and Java. Recent releases even ship the three engines as a coordinated set — v1.61 bundles Chromium 149, Firefox 151, and WebKit 26.5 — so “does it work in Safari” stops being a separate project. Parallel execution and a proper trace viewer (a frame-by-frame, time-travel record of a failed run) come in the box. No Grid to feed.

But the thing that actually tipped 2026 isn’t any of that. It’s the agents.

The migration was never really about raw speed. It was about deleting an entire category of glue work — and, in 2026, handing the boring parts to an agent.

The 2026 inflection: Playwright shipped AI agents

In late 2025, Playwright v1.56 introduced Playwright Agents — three purpose-built agent definitions that guide an LLM through the testing lifecycle, documented in the official release notes and GitHub releases:

  • a Planner that explores your app and writes a structured, Markdown test plan;
  • a Generator that turns that plan into executable Playwright code;
  • a Healer that runs the suite and automatically repairs failing tests — re-finding moved locators, updating broken steps — to keep things stable without a human babysitting every red.

This isn’t a fringe experiment. Thoughtworks called it out in Technology Radar Vol. 33 (Nov 2025), noting that “the latest Playwright release… introduced Playwright Agents,” and that they were “excited about those developments.” When the Radar starts watching something, enterprises start migrating toward it.

Here’s why this widens the gap rather than just narrowing chores: AI agents are far better at driving Playwright than Selenium. Playwright’s auto-waiting and accessibility-first locators give an agent a stable, semantic picture of the page. Selenium’s brittle selectors and manual timing give it a minefield. The more testing leans on AI, the more the underlying framework’s design decides whether that AI is reliable or a liability. That’s the real reason the switch accelerated this year.

The part the migration cheerleaders skip

Now the honest bit, because I’d be doing you a disservice otherwise: migrating is not free, and Selenium still wins a few fights.

Teams that write tests in Ruby or PHP should know that Playwright doesn’t officially support those languages, while Selenium does. For real iOS and Android device automation, Selenium combined with Appium remains the more mature choice because Playwright focuses on mobile browser emulation. Organizations that still support legacy browsers such as IE11 will also find Selenium offers broader compatibility. Likewise, large Java teams with deeply integrated TestNG or JUnit frameworks and thousands of stable tests should avoid a big-bang rewrite and instead adopt a gradual migration strategy.

The benchmarks that get quoted — one published 2026 comparison clocked a 250-test React suite at roughly 3m48s on Playwright versus 6m52s on Selenium, with flakiness around 1.4% versus 5.1% — are real but situational. Treat them as one team’s result, not a law of physics. Your mileage will depend on your app, your CI, and how disciplined your existing suite is.

So the smart move is rarely “rip it all out on Friday.” It’s usually: freeze the Selenium suite for regression, write everything new in Playwright, and migrate the highest-pain, highest-value flows first. A boring, incremental plan beats a heroic rewrite every time.

Count which branch you land on honestly. Most teams who think they’re a “stay” are actually a “hybrid,” and most who think they’re a “hybrid” are quietly a “migrate now.”

So, should your team switch?

If you’re starting fresh in 2026, I’d reach for Playwright without much agonising. If you’re sitting on a painful Selenium suite, the question isn’t whether to move — it’s how to sequence it so you keep your coverage while you do.

That sequencing is exactly where teams get hurt, usually by underestimating it. Getting a second set of eyes on your current suite before you commit — what’s worth migrating, what’s worth deleting, and what conventions to set so the new Playwright suite doesn’t rot the same way — is the cheapest insurance you can buy. At Testvox we run that kind of QA and automation review for startup and SME teams, and can embed an automation engineer to drive the migration if you’d rather not pull your own people off the roadmap. The automation case studies show what that looks like in practice.

Even an hour of review usually tells you which branch of that flowchart you’re really on.

9-Years-of-Software-Testing-Excellence

A few questions I get asked a lot

Is Selenium dead in 2026?
No — and anyone who says so is selling something. Selenium still has the widest language and browser reach and a massive enterprise install base. It’s no longer the default for new work, but “not the default” and “dead” are very different things.

How long does a Selenium-to-Playwright migration actually take?
It depends entirely on suite size and how much of it is worth keeping. The teams that finish fastest don’t migrate test-for-test — they audit first, delete the dead weight, and rewrite the valuable flows. A 1,000-test suite often hides about 300 tests that actually matter.

Can’t AI just convert my Selenium tests to Playwright automatically?
Partly. AI is good at translating syntax, and Playwright’s own Generator and Healer agents (from v1.56) take real work off your plate. But converting brittle, badly-structured Selenium tests one-to-one just gives you brittle, badly-structured Playwright tests. Someone still has to decide what’s worth keeping.

Do we need to drop Selenium entirely to start?
No. The lowest-risk path is a hybrid: keep Selenium running for regression, write all new tests in Playwright, and migrate flows in priority order. Big-bang rewrites are where migrations go to die.

Harshit Gupta

Harshit Gupta

AI Test Architect & Lead SDET with 11+ years of expertise in Playwright, API testing, automation, and AI/LLM evaluation. He focuses on delivering high-quality, user-centric software through AI-assisted testing, efficient testing strategies, and continuous innovation. Connect with him on