AI Insights

Playwright vs Selenium: Why We Made the Switch and Never Looked Back

Playwright hit 57.6 million weekly npm downloads in June 2026, nearly 28 times the volume of selenium-webdriver. Here is what the data says, how the features stack up, and why Playwright became our default testing tool at lowtouch.ai.

  • Playwright reached 57.6M npm downloads in a single week in June 2026: nearly 28x the volume of selenium-webdriver
  • Playwright has 90,350 GitHub stars vs Selenium's 34,156, despite launching 16 years later
  • Auto-wait, native parallelism, and a built-in API testing fixture cut our flaky test count to near zero
  • Playwright's trace viewer attaches a full execution recording to every CI failure: no local reproduction needed
  • Claude Code generates idiomatic Playwright tests reliably: we use it as part of our standard test authoring workflow
By Rejith Krishnan8 min read
Playwright vs Selenium: Why We Made the Switch and Never Looked Back

Every flaky test that passes in CI and fails in production costs engineering velocity. The two frameworks that have defined browser automation for the past two decades handle that problem very differently. Selenium set the standard in 2004. Playwright arrived in 2020 and started taking market share fast. The data now shows how far that shift has gone.

The Numbers: npm Downloads and GitHub Activity

The week of May 27 to June 2, 2026, playwright logged 57,637,599 npm downloads. selenium-webdriver logged 2,056,944. That is a 28x gap in a single week.

npm Weekly Downloads: Playwright vs selenium-webdriver Horizontal bar chart. playwright: 57.6M downloads. selenium-webdriver: 2.1M downloads. Week of May 27 to June 2, 2026. npm Weekly Downloads: Week of June 2, 2026 playwright 57.6M selenium-webdriver 2.1M Playwright is 28x more downloaded. Source: npmjs.com, June 2026.

The GitHub trajectory tells the same story. Playwright launched in January 2020 from Microsoft's developer tools team. In six years it accumulated 90,350 stars. Selenium's GitHub repository holds 34,156 stars from a project that began in 2004.

GitHub Repository Stats: Playwright vs Selenium, June 2026 Playwright: 90,350 stars, 5,867 forks, 169 open issues, 500+ contributors, first release 2020. Selenium: 34,156 stars, 8,686 forks, 190 open issues, 800+ contributors, first release 2004. microsoft/playwright Stars 90,350 Forks 5,867 Open Issues 169 Contributors 500+ First Release 2020 SeleniumHQ/selenium Stars 34,156 Forks 8,686 Open Issues 190 Contributors 800+ First Release 2004 Source: github.com/microsoft/playwright and github.com/SeleniumHQ/selenium, June 2026.

Note on forks: Selenium's higher fork count (8,686 vs 5,867) reflects its age. Many of those forks are legacy branches, unmaintained language bindings, and archived experiments accumulated across 20 years. It is not a sign of more active development.

The trajectory in weekly downloads tells an even starker story. Playwright barely registered in 2021. By 2023 it had overtaken selenium-webdriver in weekly downloads, and it has not looked back since.

npm Weekly Downloads Trend: Playwright vs selenium-webdriver, 2021 to 2026 Line chart. Playwright grew from approximately 0.5M weekly downloads in 2021 to 57.6M in 2026. selenium-webdriver declined from approximately 8M in 2021 to 2.1M in 2026. Lines use different weights: Playwright is thicker. Data is approximate for 2021-2024. npm Download Trajectory: 2021 to 2026 (Approximate) Playwright selenium-webdriver 60M 45M 30M 15M 0 57.6M 2.1M 2021 2022 2023 2024 2026 Approximate trends based on npm data. Jun 2026 figure is exact (57,637,599); prior years are indicative.

A Brief History

Selenium launched in 2004 when Jason Huggins at ThoughtWorks needed to automate browser testing for a web application. The WebDriver API it produced eventually became the W3C WebDriver specification, which every major browser implements natively today. Selenium is the reason browser test automation is a standardized discipline at all.

Playwright came out of Microsoft in January 2020, built by engineers who had previously built Puppeteer at Google. The team had deep access to Chromium's DevTools Protocol and used it to write a framework from the ground up: one that assumed multi-browser support from day one, built waiting into every selector interaction, and shipped parallel test workers out of the box. Firefox and WebKit support followed within months of the initial release.

Head-to-Head: Feature Comparison

Feature Playwright Selenium
Auto-wait Built-in on every action Manual waits required
Browser support Chromium, Firefox, WebKit Chrome, Firefox, Safari, Edge, IE
Parallel execution Native worker threads Requires Selenium Grid
Network interception Native (page.route) Limited; requires external proxy
Mobile emulation Built-in device profiles Via Appium (separate project)
API testing Built-in request fixture Separate library required
Trace viewer Built-in; generates .zip None
Test recorder npx playwright codegen None native
Setup time from zero ~5 minutes 30 to 60 minutes
Language support JS/TS, Python, Java, C# Java, Python, C#, Ruby, JS

Translated into a developer experience scorecard across five key dimensions:

Developer Experience Scorecard: Playwright vs Selenium, scored out of 10 Horizontal bar chart comparing Playwright and selenium-webdriver across five dimensions. Setup Time: Playwright 9, Selenium 3. Auto-Wait: Playwright 10, Selenium 2. Parallelism: Playwright 9, Selenium 5. Debug Tools: Playwright 9, Selenium 3. CI Integration: Playwright 9, Selenium 6. Developer Experience Scorecard (out of 10) Playwright selenium-webdriver Setup Time 9/10 3/10 Auto-Wait 10/10 2/10 Parallelism 9/10 5/10 Debug Tools 9/10 3/10 CI Integration 9/10 6/10 0 5 10 Opinion-based scores for JS/TS projects. Ecosystem maturity omitted; Selenium leads there.

Ecosystem maturity is one area where Selenium retains a genuine edge. Twenty years of third-party integrations, reporting plugins, and institutional knowledge cannot be replicated quickly. That gap closes as Playwright's adoption accelerates, but it is a real consideration for teams with heavy existing tooling investments.

The auto-wait row is the most consequential difference in daily use. Selenium executes clicks and fills the moment the call is made; if the DOM element is not ready, the test fails. Developers compensate with time.sleep(), WebDriverWait, and expected_conditions: lines of code whose only job is to paper over timing. Playwright checks actionability before every interaction by default. The mechanism is not a timeout; it is a real check: the element must be visible, enabled, stable, and not obscured before Playwright acts.

Where Selenium Still Makes Sense

Existing large test suites in Java or C#. If your organization has 15,000 Selenium tests that pass reliably, the migration cost is real. Playwright supports Java and C# but the idiom differs meaningfully. Pick new features or new services as migration entry points rather than attempting a bulk rewrite.

IE11 requirements. Playwright targets modern browsers only and has no IE11 support. If your compliance environment requires test evidence against IE11, Selenium remains the only practical path.

Appium-based mobile testing. Playwright's mobile support is browser emulation: viewport sizing, user-agent overrides, and touch events. It does not test native iOS or Android apps. The Selenium ecosystem's Appium project handles native app automation. For teams that need hybrid web-and-native coverage in one framework family, Selenium's ecosystem is wider.

Contractual W3C WebDriver compliance. Some enterprise procurement requirements or regulated-industry standards specifically require W3C WebDriver compliance. Playwright uses its own internal protocol but shipped a limited WebDriver-compatible mode in 2024.

Why We Use Playwright at lowtouch.ai

We migrated our entire test suite to Playwright 18 months ago. These are the reasons it stuck.

Auto-wait eliminated a whole category of failures. We had CI failures that were pure timing issues: actions landing before React state had settled after an async update. Rewriting those tests with Playwright locators removed the root cause, not just the symptom. No sleep calls, no retry wrappers.

One tool covers UI and API. Our agentic workflow endpoints and the UI that invokes them are tested in the same test run, using the same playwright.config.ts, in the same CI job. The built-in request fixture sends authenticated API calls directly, without a second tool, a second config file, or a second CI step.

The trace viewer changed how we debug CI failures. When a test fails in CI, Playwright attaches a trace archive to the artifact. We open it locally with npx playwright show-trace, and step through every network request, every DOM snapshot, and every console log from the failed run. Time-to-root-cause dropped from hours to under 15 minutes for most failures.

codegen plus Claude Code accelerates test authoring. We open a browser session with npx playwright codegen https://app.lowtouch.ai, walk through a user flow, and get a complete test scaffold. We hand that to Claude Code with a prompt like "clean this up and add assertions for error states." The output is consistently idiomatic Playwright. It is not a substitute for deliberate test design, but it handles 80% of the boilerplate for straightforward happy-path flows.

Zero extra CI infrastructure. One npx playwright install --with-deps in the CI container installs the browsers. GitHub Actions has a maintained action for this. No Selenium Grid to configure, no additional service containers, no external browser farm.

Getting Started: 3 Commands

npm init playwright@latest
npx playwright test
npx playwright show-report

The init command creates playwright.config.ts, a sample spec, and a GitHub Actions workflow file. A minimal production config:

import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  fullyParallel: true,
  retries: process.env.CI ? 1 : 0,
  workers: process.env.CI ? 4 : undefined,
  reporter: [['html'], ['github']],
  use: {
    baseURL: process.env.BASE_URL ?? 'http://localhost:3000',
    trace: 'on-first-retry',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
  ],
});

trace: 'on-first-retry' captures traces only on failure, keeping artifact sizes manageable in CI. Remove projects entries for browsers you do not ship to.

The Bottom Line

Playwright's 28x npm download advantage over selenium-webdriver and 2.6x GitHub star lead are not flukes. They reflect a framework that removed the primary source of test brittleness, unified UI and API testing in one tool, and shipped a debugging experience that scales across distributed CI. If you are starting a new project today, Playwright is the default. If you are on Selenium, pick a seam: a new microservice or a new feature branch. Start Playwright there. The migration does not have to be all-or-nothing.

About the Author

Rejith Krishnan

Rejith Krishnan

Founder and CEO

Rejith Krishnan is the Founder and CEO of lowtouch.ai, a platform dedicated to empowering enterprises with private, no-code AI agents. With expertise in Site Reliability Engineering (SRE), Kubernetes, and AI systems architecture, he is passionate about simplifying the adoption of AI-driven automation to transform business operations.

Rejith specializes in deploying Large Language Models (LLMs) and building intelligent agents that automate workflows, enhance customer experiences, and optimize IT processes, all while ensuring data privacy and security. His mission is to help businesses unlock the full potential of enterprise AI with seamless, scalable, and secure solutions that fit their unique needs.

LinkedIn →