Will Playwright become next Selenium?

Babu Manickam
TestLeafTechBlog
Published in
3 min readJul 25, 2022

--

The Selenium project has been extremely successful as browser automation project. Selenium has now been downloaded over several million times and continues to top the table across the globe.

There are several reasons for Selenium’s success.

1. Selenium is open source, and it has multiple language bindings (like Java, C#, Js, Python, Ruby, Perl ..) and supports all browsers (chrome, firefox, edge, ie, safari, opera ..) and can be executed on multiple OS (Windows, MAC, Linux).

2. Selenium is versatile — it can be used for testing the web including cross-browser testing.

3. Selenium has a large user community that can help you get started quickly.

4. Selenium is very stable compared to other open-source tools and it has standardised W3C communication across browsers.

5. Finally, the Selenium community is vibrant with many events and workshops held regularly where you can discuss the latest tools and techniques with like-minded individuals.

Will Playwright Become Next Selenium?

Considering modern web application automation, Selenium WebDriver seems to be one of the favorite tools, however, alternative tools like Playwright, Puppeteer, Cypress are emerging to displace it on longer run.

Playwright is a JavaScript framework that supports automating web applications on the front-end. It uses Node.js for the back-end, just like Puppeteer does. It extends the framework to give users all the tools they need to write end-to-end tests or to test specific parts of the application in isolation.

Write Tests in language bindings including Java, Js, C#, Python and run on any browser with any OS like Selenium WebDriver. It is open source, it’s easy to use and can be scaled out to support multiple testers on a team.

There are seven major reasons why Playwright can become next Selenium in the UI Automation domain:

1. Playwright is backed by Microsoft and creators are from Puppeteer (Google) team and thus the knowledge sharing from Puppeteer team becomes applicable for Playwright. Also, it has already released multiple release across language bindings and feedback from the community has been very positive.

2. Playwright automation is simpler than Selenium through Playwright simplified architecture compared to the native driver dependency in Selenium WebDriver. Thus, it does away with the complicated-to-set-up-and maintain native driver dependencies.

3. The test execution speed of Playwright is very high (40% faster on average) as it uses JavaScript engines like Node.js to run the tests than Selenium WebDriver. Hence, the test execution time can be brought down significantly using Playwright when compared with Selenium WebDriver.

4. Unlike Selenium WebDriver, Playwright provides support for video capturing of test execution in addition to the full screenshot of the test page.

5. The flakiness, support and maintenance cost of Playwright is lower as compared to Selenium WebDriver because it uses internal waits unlike Selenium WebDriver which needs to manage explicit waits. This significantly reduces the total cost of ownership.

6. Playwright also supports RESTFul API testing in addition to web testing . This gives testers the flexibility to test their web services using Playwright without having to learn and use Selenium WebDriver and API Testing library like RestAssured.

7. Finally, the dev-tools integration is lot more easier with Playwright and which makes authoring dev tests with Playwright very easy and simple.

Top Reasons

At TestLeaf/Qeagle, we foresee Playwright will become the next Selenium and we help organisations transition from using Selenium WebDriver to using Playwright painlessly thereby saving time, cost and resources.

--

--

Babu Manickam
TestLeafTechBlog

Author, Speaker, Mentor and Coach - Test Automation & DevOps