In brief
Playwright is a good choice for new web projects: it supports the Chromium, Firefox and WebKit engines, the languages JavaScript and TypeScript, Python, Java and .NET, and has built-in waiting for elements. Cypress gives frontend teams writing JavaScript a convenient environment, but it runs inside the browser and has limitations with multiple tabs and domains. Selenium is based on the W3C WebDriver standard, has the widest choice of languages and the Grid infrastructure, so it suits large, multilingual organizations and existing test suites.
Three different architectures
The differences between the tools come from how they drive the browser.
Selenium drives the browser through the WebDriver protocol, which is a W3C standard. Each browser has a driver that accepts commands, and a test can be written in any language that has a client library. The Selenium documentation lists Java, Python, C#, Ruby, JavaScript and Kotlin. Selenium Grid is used for parallel execution on multiple machines, and Selenium Manager downloads drivers and browsers automatically.
Cypress runs test code inside the browser, in the same event loop as the application. This gives direct access to the application, a view of each step and convenient debugging. The consequence is limitations that the Cypress documentation describes explicitly: tests are written only in JavaScript, one test does not drive two browsers at once, and navigating between domains requires the `cy.origin` command.
Playwright drives browsers from the outside, through its own connection to each engine. It supports Chromium, Firefox and WebKit, as well as branded Chrome and Edge. The library is available for Node.js, Python, Java and .NET. In one test you can open several browser contexts, tabs and domains, which makes it easier to test processes with a redirect to a payment gateway or with two users at once.
Comparison in one table
| Aspect | Playwright | Cypress | Selenium |
|---|---|---|---|
| Test languages | JavaScript and TypeScript, Python, Java, .NET | JavaScript and TypeScript | Java, Python, C#, Ruby, JavaScript, Kotlin |
| Browsers | Chromium, Firefox, WebKit, branded Chrome and Edge | Chrome family, Firefox, WebKit | Any browser with a WebDriver driver |
| Waiting for elements | Built in before every action | Built-in retrying of commands and assertions | Explicit waits written in the test |
| Multiple tabs and domains in a test | Yes | Limited, multiple domains through `cy.origin` | Yes |
| Parallelism | Built into the runner | Through a cloud service or your own configuration | Selenium Grid or external services |
| Standard | Own protocol | Own architecture | W3C WebDriver |
| Diagnostics | Trace Viewer: steps, DOM snapshots, network, console | Step view in the browser, recordings | Depends on the framework and reports |
The table describes capabilities according to the vendors' documentation at the time of writing. The tools evolve quickly, so check the current documentation before deciding.
When each choice makes sense
Choose Playwright when:
- you are starting automation for a new web application and want to test in several engines, including WebKit;
- processes span several domains, for example a store, a payment gateway, a return to the store;
- the testers write in Python, Java or C#, and the frontend developers in TypeScript, and both groups should use one tool;
- you care about diagnostics for flaky tests in CI.
Choose Cypress when:
- tests are written mainly by frontend developers in JavaScript or TypeScript;
- the application runs in one domain and does not need multiple tabs;
- fast feedback while writing a test matters, along with component tests in the same tool.
Choose Selenium when:
- the organization has a large, working Selenium suite and Grid infrastructure. Rewriting several thousand tests rarely pays off if the current ones are stable;
- the team writes in Java or C# and has a framework with patterns that already work;
- you need browsers or environments offered by cloud providers that support the WebDriver protocol;
- web application tests should use the same protocol as mobile tests in Appium, which is also based on WebDriver.
What to look at beyond the table
Choosing a tool is rarely decided by a feature list. More important are:
- Team skills. A tool in a language nobody on the team knows means months of learning and tests written against good practices.
- Existing code and integrations. A framework with reporting, test data and a connection to a test management system is often worth more than the tool itself.
- Application architecture. An application with embedded frames, login windows from an external identity provider or redirects to partners rules out tools with domain limitations.
- Browser requirements. If a significant group of users is on Apple devices, testing in the WebKit engine stops being optional.
- Maintenance cost. Any tool can be used badly. Locators based on page structure and fixed delays produce flaky tests in every one of them.
Regardless of the tool, E2E tests should be the top, narrow layer of the suite. How many you need and what to move lower is covered in the article on the test pyramid in practice.
How to run the selection and migration
It is best to base the decision on a short trial, not on presentations:
- Pick three to five paths that are the hardest in your application: login through an external provider, payment, file upload, a table with a lot of data.
- Write them in two candidate tools, with the involvement of the people who will maintain them afterward.
- Run them in CI dozens of times and compare duration, stability and the quality of diagnostics on failure.
- When migrating from Selenium, do not rewrite everything at once. Write new tests in the new tool, move old ones as you change a given area, and move tests that check rules down to the API level.
Patterns known from Selenium, such as page objects and explicit waiting for a condition, carry over to the other tools. An example of E2E tests for a purchase path is the case study Test automation for the purchase path and payments in multiple countries.
Questions and answers
Is Selenium obsolete?
No. Selenium is actively developed, based on the W3C WebDriver standard, and supports the most languages and infrastructure providers. Common complaints are really about old frameworks with manual waiting and brittle locators. A modern Selenium project with explicit waits, page objects and data prepared through the API can be just as stable as one in the newer tools.
Is Playwright suitable for testing mobile apps?
For testing pages in a mobile view, yes: Playwright emulates screen sizes, touch devices and the WebKit engine. It does not test native iOS and Android apps. For mobile banking or operator apps you need a mobile tool, for example Appium, and real devices or a cloud device farm for tests that depend on hardware.
Can you use two E2E tools in one organization?
You can, but each additional tool means separate patterns, libraries and knowledge to maintain. A sensible setup is one tool for web application E2E tests and a separate one for mobile apps. Two web tools at once make sense temporarily, during a migration, with a clear plan for moving the old tests.
Which tool is the fastest?
It depends on the application and configuration, so it is worth measuring on your own paths. The time of a full suite depends more on the number of E2E tests, data preparation and parallelism than on the tool itself. A test that logs in through the interface before every path will be slow in any tool. Saving session state and creating data through the API cuts time more than switching libraries.