Playwright vs Cypress vs Selenium: Which Testing Framework to Pick

Playwright, which you can run and debug from its VS Code extension, is the best default for most teams. Cypress is still the better pick for JavaScript-only frontend teams that value its debugging. Selenium is still the answer for native mobile testing through Appium and for legacy browsers.

All three are open source and actively maintained. Check each project’s own release page for the current version before installing. This page covers end-to-end browser testing, not unit tests on JavaScript code.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

Architecture: how each framework drives the browser

Playwright, backed by Microsoft, talks to browsers over their native debugging protocols: the Chrome DevTools Protocol (CDP) for Chromium and equivalent protocols for Firefox and WebKit, over persistent WebSocket connections. With no HTTP round-trip per command, that is a plausible reason for its speed and low flakiness in the benchmarks below. Each test gets its own browser context by default, which isolates tests without launching a new browser process. It supports TypeScript, JavaScript, Python, Java and C#/.NET. Auto-wait is built into every action: when you call page.click(selector), Playwright waits for the element to be visible, enabled, stable (not animating) and ready to receive events, which removes a category of flaky tests common in Selenium suites.

Cypress runs inside the browser alongside your application, with direct access to the DOM, network requests, timers and runtime state. That enables time-travel debugging (hover over a command to see the DOM at that point) and automatic waiting. It also sets limits: Cypress is limited to JavaScript and TypeScript, has no native multi-tab support, and cross-origin navigation and browser-level events such as downloads and permission prompts are harder than in Playwright.

Selenium is the grandfather of browser automation. It uses the W3C WebDriver protocol: commands go as HTTP requests to a browser-specific driver binary (ChromeDriver, GeckoDriver and so on), so every action needs at least one HTTP round-trip, which adds latency compared with Playwright’s direct connection. In return it offers the widest language support (Java, Python, C#, JavaScript, Ruby, Kotlin and more), the broadest browser compatibility including legacy browsers, and native mobile testing via Appium.

Feature-by-feature comparison

Check each project’s GitHub page for current star counts.

FeaturePlaywrightCypressSelenium
Latest Stable VersionCheck the releases pageCheck the changelogCheck the releases page
Created ByMicrosoftCypress.ioSelenium Project
ArchitectureChrome DevTools Protocol (CDP) / WebSocketIn-browser JavaScript injectionW3C WebDriver Protocol / HTTP + BiDi
Language SupportTypeScript, JavaScript, Python, Java, C#JavaScript, TypeScript onlyJava, Python, C#, JS, Ruby, Kotlin, PHP
Browser SupportChromium, Firefox, WebKit (Safari)Chrome, Edge, Firefox, ElectronAll browsers via WebDriver (incl. legacy IE)
Auto-WaitingBuilt-in on every actionBuilt-in with DOM observationManual waits (improved with BiDi)
Parallel ExecutionBuilt-in, free (workers configurable)Free locally, Cloud for CI parallelizationSelenium Grid (self-hosted or cloud)
Multi-Tab / Multi-WindowFull native supportNo native supportSupported via window handles
Network InterceptionFull route/intercept API via CDPBuilt-in cy.intercept()Limited natively; BiDi improving
Component TestingExperimental (mount API)Full built-in (React, Vue, Angular, Svelte)Not supported natively
Mobile TestingDevice emulation (viewports, geolocation)Viewport emulation onlyNative + hybrid via Appium integration
Visual TestingBuilt-in screenshots, video, trace viewerBuilt-in screenshots, video recordingBasic screenshots; third-party for advanced
API TestingBuilt-in request context (APIRequestContext)cy.request() for basic HTTPNot built-in; use RestAssured or similar
CI/CD IntegrationFirst-class (GitHub Actions, GitLab, Jenkins)First-class + Cypress Cloud dashboardUniversal (any CI via WebDriver)
GitHub StarsSee the repo pageSee the repo pageSee the repo page
npm Weekly Downloads~30-33 million (varies by source)~6.7 million~2.1 million (selenium-webdriver)

Three rows do most of the work in a decision. Language support rules out Cypress for any team that is not on JavaScript or TypeScript. Mobile testing is where only Selenium with Appium reaches native apps. Component testing is where Cypress is fully built in and Playwright’s is still experimental. Most other rows separate Playwright’s built-in parallelism and tooling from the extra setup that Cypress Cloud or Selenium Grid need.

Published speed and stability figures, and how far to trust them

The speed and stability figures below are third-party claims. Treat them as indicative only and test your own suite before deciding on speed.

Benchmark MetricPlaywrightCypressSeleniumSource
Tests Per Hour (throughput)~1,240~857~670TestDino 2026
Single Test Execution4.0 seconds5.0 seconds9.0 secondsARDURA 2026
Per-Action Speed (avg)290 ms (baseline)420 ms (1.45x slower)536 ms (1.85x slower)TestDino 2026
200-Test Suite (single machine)18 minutes28 minutes42 minutesARDURA 2026
200-Test Suite (4 workers)6 minutes9 minutes14 minutesARDURA 2026
Test Stability Rate92%81%72%Vervali 2026
Flakiness Reduction vs Baseline80-90%60-70%BaselineTestDino 2026
CI Retry Frequency (vs Playwright)Baseline+18%+35%Vervali 2026
Cold Start Time1-3 seconds4-8 seconds3-5 secondsARDURA 2026
RAM Usage (per browser)2.1 GB3.2 GB4.5 GBTestDino 2026
Max Parallel Workers (8-core)15-304-84-8 (Grid for more)TestDino 2026

Our own division of the per-action cells gives the 1.45x (420 ms ÷ 290 ms) and 1.85x (536 ms ÷ 290 ms) ratios shown in the table. A plausible reason for Playwright’s lead is its WebSocket-based protocol and browser context isolation, which avoid a full browser restart between tests.

ARDURA also reports a second, sequential data set. There, Playwright completes a suite in 3 minutes 20 seconds versus 3 minutes 45 seconds for Cypress and 8 minutes 45 seconds for Selenium, and pass rates favor Cypress at 96%, followed by Playwright at 94% and Selenium at 84%. That makes Cypress and Playwright look close on single-machine speed and pass rate, while the 200-test row in the table (18 minutes against 28) shows a wide gap. The two data sets disagree, so treat the Cypress-versus-Playwright speed gap as unsettled and test your own suite before deciding on speed alone.

What each framework costs

All three frameworks are open source and free to use. Total cost of ownership differs once you add CI/CD infrastructure, cloud dashboards and parallel execution. Cypress Cloud prices change, so check Cypress’s own pricing page before budgeting.

Pricing TierPlaywrightCypressSelenium
Core FrameworkFreeFreeFree
Parallel ExecutionFree (built-in workers)Free locally; Cypress Cloud for CIFree (Selenium Grid, self-hosted)
Cloud DashboardNone (use Allure, ReportPortal)Free Starter tier (limits on Cypress’s pricing page)None (third-party clouds such as BrowserStack, Sauce Labs)
Paid Tier 1N/APaid Team tier (see Cypress’s pricing page)N/A (cloud vendors price separately)
Paid Tier 2N/APaid Business tier (see Cypress’s pricing page)N/A (cloud vendors price separately)
EnterpriseN/ACustom pricingCloud vendors: custom
Additional Test ResultsN/APer-result overage on paid tiersN/A (infrastructure cost only)
CI Infrastructure CostLow (lightweight workers)Medium (heavier RAM per worker)High (Grid setup + driver management)

Playwright’s cost advantage comes from free, built-in parallelization. For Cypress the framework is free, but CI parallelism pushes you toward the paid Cloud. For Selenium you pay in Grid infrastructure and driver management instead.

The Cypress bill is driven by results volume and CI parallelism. Estimate your yearly test results (tests x runs per day x working days) before committing and compare that with the allowance on Cypress’s pricing page for each tier, then weigh any paid plan against what your CI minutes cost you.

Learning curve and debugging

Cypress has traditionally held the strongest developer experience. The learning curve matters because the fastest framework is no use if your team cannot write reliable tests with it.

Playwright centers on its VS Code extension and trace viewer. The VS Code extension lets you run, debug and record tests from the editor with breakpoints, step-through debugging and live browser preview. The trace viewer records every network request, DOM snapshot, console log and action timeline in a single file you can share with teammates. The codegen tool generates test code by recording your browser interactions, which speeds up onboarding new testers.

Cypress remains best-in-class for frontend-focused JavaScript developers. The interactive test runner shows your application in one panel and the test commands in another, with time-travel debugging that lets you hover over any command to see the exact DOM state. The cy.intercept() API for network stubbing is intuitive, and the .should() assertion chain reads almost like plain English.

Selenium has improved but still needs more setup and boilerplate than either competitor. You install language bindings, download browser drivers (or use WebDriverManager) and configure wait strategies by hand. With no built-in auto-waiting you must learn explicit, implicit and fluent waits. For teams already on Java, Python or C#, though, Selenium fits more naturally than JavaScript-only tools.

Downloads, retention and market share: where the sources disagree

On downloads, Playwright is clearly ahead. It has gone from under 1 million weekly npm downloads in 2021 to roughly 30 to 33 million in the first half of 2026 (a rise BrowserBash pegs at more than 3,000% in five years). Other sources put it at 33 million in Q1 2026, so figures differ by a few million depending on source and sampling week. For comparison, Cypress sits at 6.7 million weekly downloads and Selenium’s selenium-webdriver at 2.1 million. Playwright surpassed Cypress in total npm downloads in late 2024, according to Checkly’s analysis.

The State of JS surveys add context, with two different measures that are easy to confuse. In the 2024 survey Playwright had the highest retention rate (94%) among E2E testing tools, meaning 94% of developers who tried it would use it again, while Cypress saw its retention decline slightly. The State of JS 2025 survey measured satisfaction instead, so its figures are not comparable with the retention number. The 2024 retention figure is the only State of JS number given here.

Metric (2026)PlaywrightCypressSelenium
Market Share (E2E tools)25% to 45% (varies by source)14% to 30% (varies by source)22% to 26% (varies by source; GetPanto.ai gives 23-26%, others 22%)

Market share estimates vary widely by source. By May 2026, BrowserBash estimated Playwright’s adoption among QA professionals at roughly 45%, versus about 22% for Selenium and 14% for Cypress, and CrossCheck’s 2026 survey roundup put Playwright at 45.1%, Selenium at 22.1% and Cypress at 14%. GetPanto.ai’s July 2026 analysis, by contrast, put Selenium at 23-26% market share, Cypress at 30% and Playwright at 25%, still trailing in raw share despite 240% year-over-year npm download growth.

Our contribution here is to reconcile the conflicting sources rather than add another number. The spread between 25% and 45% for Playwright probably comes from who is counted: surveys of QA professionals and company listings measure different populations. Download counts likely reflect new projects and CI installs, while company counts reflect installed base. The sensible reading is that Playwright leads on momentum and Selenium still leads on installed base.

Which framework fits which team

The right choice depends on team skills, application architecture, existing infrastructure and what you are testing. Five scenarios follow.

Startup building a React/Next.js SPA

Choose: Cypress. For a small team of 2-5 JavaScript developers building a single-page application, Cypress offers a short path from zero to reliable E2E tests. The interactive runner, time-travel debugging and built-in component testing for front-end frameworks such as React and Vue make it a productive choice, and the free Starter tier of Cypress Cloud may cover a startup’s volume, which you can check with the estimate above.

Enterprise migrating from a legacy Selenium suite

Choose: Playwright. If you have a Selenium suite of 500+ tests and flakiness above 20%, migrating to Playwright should deliver the highest return, given the stability and retry figures in the benchmarks above. Selenium’s page-object model patterns transfer directly, and many locator strategies are similar. The cited benchmarks suggest faster execution and fewer flaky tests, but test that on a pilot of your own suite rather than assuming the published gains.

QA team testing a multi-language microservices platform

Choose: Playwright. When services are in Java, Python and Node.js and QA members have different language backgrounds, Playwright supports all three, whereas Cypress covers only JavaScript and TypeScript. Selenium also covers them but has no built-in auto-waiting. One suite can be written in Python by one person and TypeScript by another, sharing page objects and utilities.

Mobile-first company needing native app and web testing

Choose: Selenium + Appium. To test native iOS and Android apps and web apps through one framework, Selenium with Appium has a native path and the other two do not. Playwright offers device emulation (viewports, geolocation) for mobile web but cannot interact with native app elements, and Cypress offers viewport emulation only.

DevOps team cutting CI/CD costs

Choose: Playwright. When the CI bill is dominated by test execution minutes, built-in parallelization and lower RAM use per browser make it the strongest candidate. In ARDURA’s figures, 200 tests with 4 workers take 6 minutes on Playwright versus 9 on Cypress and 14 on Selenium. Price the saving against your own runner minutes.

Puppeteer is outside this comparison: it targets browser automation rather than test running.

Migrating from Selenium or Cypress to Playwright

Selenium is likely to stay relevant in enterprise Java shops, regulated industries and teams that need Appium for native mobile. If your Selenium suite is stable, or you depend on Selenium Grid or Appium, the benchmarks above are not a reason to migrate by themselves.

Where migration does make sense, estimates of 2-4 months for a mid-sized suite (200-500 tests) circulate in third-party guides, so treat the range as a rough external estimate. To size your own suite, count specs, custom commands and plugins, then port the ten flakiest specs first while the old suite keeps running. How long that pilot takes is a better estimate than any published schedule. The phases below follow those guides.

Phase 1: Audit and prioritize

Audit the existing suite. Identify tests that are flaky (we suggest failing more than 10% of the time), obsolete (testing removed features) and critical (covering revenue-generating flows). Removing obsolete tests first avoids migrating dead code.

// Example: Selenium (Java) to Playwright (TypeScript) migration
// BEFORE - Selenium Java
WebDriver driver = new ChromeDriver();
driver.get("https://app.test");
WebElement button = driver.findElement(By.cssSelector(".submit-btn"));
new WebDriverWait(driver, Duration.ofSeconds(10))
    .until(ExpectedConditions.elementToBeClickable(button));
button.click();

// AFTER - Playwright TypeScript
const { test, expect } = require('@playwright/test');
test('submit form', async ({ page }) => {
  await page.goto('https://app.test');
  await page.click('.submit-btn'); // auto-waits built in
});

Phase 2: Parallel running

Run the existing Selenium or Cypress suite alongside a new Playwright suite on the same critical paths. Start by rewriting your top 20 most-run tests in Playwright and compare results side by side. This dual-running period builds confidence before you decommission the old suite.

Phase 3: Full migration and Grid retirement

Once the parallel suite proves stable, migrate the rest in priority order: critical flows first, edge cases last. Retire your Selenium Grid infrastructure if you have one, which should cut server costs.

// Example: Cypress to Playwright migration
// BEFORE - Cypress
cy.visit('https://app.test/login');
cy.get('[data-testid="email"]').type('[email protected]');
cy.get('[data-testid="password"]').type('password123');
cy.get('[data-testid="login-btn"]').click();
cy.url().should('include', '/dashboard');

// AFTER - Playwright
test('login flow', async ({ page }) => {
  await page.goto('https://app.test/login');
  await page.getByTestId('email').fill('[email protected]');
  await page.getByTestId('password').fill('password123');
  await page.getByTestId('login-btn').click();
  await expect(page).toHaveURL(/dashboard/);
});

Teams that want both tools can run Cypress for component testing and Playwright for E2E. That adds complexity, so for most teams one framework used consistently is simpler to maintain.

Parallel CI: sharding Playwright in GitHub Actions

Playwright shards natively with the --shard flag, so the workflow below splits one suite across four runners. Cypress needs Cypress Cloud credentials in the CI environment to parallelize, and Selenium parallelizes through Selenium Grid.

# Playwright - GitHub Actions (minimal config)
name: Playwright Tests
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
      - run: npm ci
      - run: npx playwright install --with-deps
      - run: npx playwright test --shard=${{ matrix.shard }}
    strategy:
      matrix:
        shard: [1/4, 2/4, 3/4, 4/4]
Marcus Chen

Marcus Chen

PC hardware, storage and engineering

Marcus Chen covers PC hardware, storage and engineering for Tech Insider: processors, graphics cards, SSDs and hard drives, home servers and backup, and the engineering choices behind them. He builds comparisons from manufacturers' specifications, published independent test results and Tech Insider's own calculations, and writes plainly about what the evidence supports.

View all articles