Playwright, Selenium, and Cypress all let you drive a browser from code. They are not interchangeable. The right choice depends on your stack, your team's language preference, and what you are actually testing. This post compares the three honestly, including the parts the vendor docs gloss over.
The 30-second snapshot
| Playwright | Selenium | Cypress | |
|---|---|---|---|
| Year released | 2020 (Microsoft) | 2004 (community + SeleniumHQ) | 2017 (Cypress.io) |
| Languages | TS, JS, Python, .NET, Java | Java, Python, C#, Ruby, JS, Kotlin | JavaScript, TypeScript only |
| Browsers | Chromium, Firefox, WebKit (Safari) | Chrome, Firefox, Edge, Safari, IE 11 | Chrome, Edge, Firefox, Electron, WebKit (exp.) |
| Architecture | WebSocket per browser context (single process) | W3C WebDriver protocol over HTTP | In-browser, runs inside the page itself |
| Auto-wait | Built in | Manual (WebDriverWait) | Built in |
| Network mocking | First-class (route()) | Via BiDi or third-party (browsermob) | First-class (intercept()) |
| Parallelism | Worker per file, free | Selenium Grid, you host | Paid for parallel on Cloud, or self-shard |
| Best at | Modern web apps, multi-tab, multi-origin | Legacy stack, broad language support, IE 11 | Single-app SPA, frontend-team-owned tests |
The same test in all three
A real comparison needs the same test. Here is “log in with a valid email, assert the dashboard greeting loads” in each tool. Notice the verbosity differences.
Playwright (TypeScript)
tsimport { test, expect } from '@playwright/test'; test('login lands on dashboard', async ({ page }) => { await page.goto('https://juice.upcode.in/login'); await page.getByLabel('Email').fill('[email protected]'); await page.getByRole('button', { name: 'Send me a code' }).click(); await expect(page.getByText('Welcome back')).toBeVisible(); });
Selenium (Python + PyTest)
pythonfrom selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC def test_login_lands_on_dashboard(): driver = webdriver.Chrome() driver.get("https://juice.upcode.in/login") driver.find_element(By.NAME, "email").send_keys("[email protected]") driver.find_element(By.XPATH, "//button[contains(., 'Send me a code')]").click() WebDriverWait(driver, 10).until( EC.visibility_of_element_located((By.XPATH, "//*[contains(text(), 'Welcome back')]")) ) driver.quit()
Cypress (JavaScript)
jsdescribe('login', () => { it('lands on dashboard', () => { cy.visit('https://juice.upcode.in/login'); cy.get('input[name="email"]').type('[email protected]'); cy.contains('button', 'Send me a code').click(); cy.contains('Welcome back').should('be.visible'); }); });
Speed and stability
Independent benchmarks published through 2025 and 2026 consistently put Playwright fastest, Cypress middle, Selenium slowest. The gap is real but smaller than vendor blogs suggest. For a typical 200-test e-commerce regression pack on a 4-core CI runner:
| Tool | Median run (sec) | Flake rate observed | Why |
|---|---|---|---|
| Playwright | ~340 | ~3% | WebSocket transport, single process per context |
| Cypress | ~520 | ~5% | Runs in-browser, but no parallel without Cloud add-on |
| Selenium 4 (WebDriver BiDi) | ~660 | ~8% | HTTP per command, no built-in auto-wait, more network round-trips |
Numbers above are typical, not absolute. Your suite's own waits, network setup, and CI runner specs will shift things. The takeaway is the order, not the exact figures.
Debugging
- Playwright. The killer feature is the
--uimode and the trace viewer.playwright show-traceopens a timeline of every step with screenshots, DOM snapshots, console logs, network calls, and clickable selectors. Best debugging experience in the category. - Cypress. Time-travelling test runner that rewinds the DOM at every command. Excellent for frontend devs. The catch is that Cypress runs inside the page, so some real-browser behaviour (multi-tab, file downloads, cross-origin) is awkward.
- Selenium. No native debug UI. You stitch together video recording, screenshots, Allure reports, and BrowserStack/Sauce dashboards. Works but more setup.
CI cost and parallelism
Selenium is free to scale. Playwright is free to scale. Cypress is free to run, but parallelisation is a paid Cypress Cloud feature unless you self-shard with cypress-split or a similar plugin. For a 30-person team running on 8 parallel shards, Cypress Cloud lands around USD 75-300 per user per month.
Which one for an Indian team in 2026?
Our honest take, drawn from QA engagements at BFSI and e-commerce clients over the last three years:
- Greenfield project, modern web app, small team: Playwright. The DX is best, the docs are good, hiring is getting easier because Selenium engineers move sideways quickly.
- Existing Java + Selenium suite with 1000+ tests: Stay on Selenium. Migration costs more than it saves unless the suite is brittle to begin with.
- Frontend team owns the tests, no dedicated QA: Cypress. Frontend devs are productive in it from day one. Just plan for the Cypress Cloud licence if you parallelise.
- Need to test on IE 11 (banking, government): Selenium. It is the only one that still does IE.
- API-heavy product where the UI is secondary: Playwright. The
requestfixture lets you mix UI and API tests in one suite without leaving the framework.
Hiring signal in India (2026)
| Tool | Active LinkedIn listings (India) | Median experience asked |
|---|---|---|
| Selenium | ~12,500 | 3-6 years |
| Playwright | ~3,800 (growing 90%/yr) | 2-5 years |
| Cypress | ~2,100 | 2-5 years |
Selenium still wins on volume. Playwright pays a 10-20 percent premium for the same experience because supply is tight. Cypress sits between the two; demand is heaviest at product-first startups.
Bottom line
There is no universal winner. Playwright is the default we recommend for new web testing projects in 2026. Selenium is the default for anything with a 5-year-plus existing test suite. Cypress is the default when the frontend team will own the tests.
If you want to learn any of these hands-on with a CI pipeline and a portfolio repo at the end, our Pro Software Testing & Automation program teaches Selenium + PyTest end-to-end and covers Playwright in a comparative phase. Selectors transfer cleanly between all three; practice them in our interactive selectors lab.
References
- Playwright official docs · The primary source for capability claims.
- Selenium official docs · WebDriver protocol reference.
- Cypress official docs · Architecture and limitations are documented honestly.
- W3C WebDriver BiDi specification · The protocol Selenium 4 uses.
- Why Playwright (Microsoft) · Vendor view, but cites real-world reasons.