Selenium vs Playwright
People think Selenium and Playwright are old and new names for one tool, and they are not. Selenium dates from 2004 and talks to each browser through the WebDriver standard, in languages such as Java, C# and Ruby. Playwright came out in 2020. It waits for each button to be ready by itself, so its tests tend to break less.
Selenium
Tools that drive web browsers from code, in many languages.
Selenium is a set of tools that drive web browsers from code. Its main part, WebDriver, controls a browser the way a person would. WebDriver is now an official web standard, so every big browser supports it. You can write Selenium tests in Java, Python, C#, Ruby, JavaScript and Kotlin. It is one of the oldest browser test tools. Many teams still use it.
Playwright
A tool that drives a real browser from code, to test a site like a user.
Playwright is a tool that drives a real web browser from code. It is mostly used for end-to-end tests. Microsoft released it in 2020. One test can run in Chromium, Firefox and WebKit, the engine behind Safari. It waits for buttons and text to appear before it acts, which cuts down flaky tests. You can write tests in JavaScript, TypeScript, Python, Java or C#.
In one line
- Selenium
- Tools that drive web browsers from code, in many languages.
- Playwright
- A tool that drives a real browser from code, to test a site like a user.