Q3 of 42 · Playwright
What is Playwright and what makes it different from Cypress and Selenium?
Short answer
Short answer: Playwright is Microsoft's open-source automation framework. It drives Chromium, Firefox, and WebKit out of the box, supports multiple tabs and origins natively, ships with a test runner, and does auto-waiting like Cypress — but using a remote-control protocol like Selenium. It's the third option that fits between the two.
Detail
Playwright was launched by the team that previously built Microsoft's Puppeteer fork. The design goals were explicit: cover the gaps of both Cypress (single-tab, single-origin, single-language) and Selenium (verbose, no auto-wait, weak parallel runner).
Architectural position:
- Selenium: out-of-process via WebDriver. Polyglot, proven, slow, no auto-wait by default.
- Cypress: in-process inside the browser. Fast, auto-wait, time-travel debugging, but locked to JavaScript and one tab/origin.
- Playwright: out-of-process via its own protocol (CDP for Chromium, custom protocols for Firefox/WebKit). Auto-wait built in, multi-tab/origin natively, multiple languages (TypeScript, Python, Java, .NET).
Distinctive features:
- Cross-browser: Chromium, Firefox, WebKit (real Safari engine), all driven from the same API. Selenium can do this too; Cypress can't.
- Trace viewer: post-run interactive trace with DOM snapshots, network, and console. Stronger debugging than Selenium, comparable to Cypress's time-travel.
- Test runner included:
@playwright/testships parallel execution, fixtures, retry, sharding, projects. Selenium needs a separate runner; Cypress has its own. - Auto-wait:
page.click(...)waits for the element to be actionable before clicking. NowaitForElementVisibleboilerplate. - Multiple browser contexts in one test for testing multi-user scenarios.
Trade-offs: Playwright is younger than Selenium and has a smaller ecosystem of plugins. The trace viewer is excellent but has its own learning curve. Cross-browser visual differences sometimes surface differently than Cypress users expect.
In 2026 the typical choice is: Playwright for new projects (best balance of features and DX), Cypress for projects already invested in it (mature, good DX), Selenium when polyglot or grid scaling matters.