Skip to content
BENIBIX Learn

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.

Development🧪 Testing & Quality

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.

Example
A bank's test team writes Selenium tests in Java. The same tests run on Chrome, Firefox and Edge each night.
Why it matters
It works with many languages and every big browser, so most teams can use it.
Full entry
Development🧪 Testing & Quality

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#.

Example
Jack's Playwright test opens his sign-up page in three browsers, fills the form and checks the welcome message. It catches a bug that only Safari had.
Why it matters
It tests the site the way people use it, in the browsers they really use.
Full entry

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.