Skip to main content

Playwright vs Puppeteer

Today, we will discuss two open-source tools, Playwright from Microsoft and another one is Puppeteer from Google. 

Criteria Playwright Puppeteer
Origin
 
The Playwright was started in 2020 after Microsoft hired the top two contributors of Puppeteer. Puppeteer started as an official google project in 2017.
Supported Languages
 
Playwright supports Java, Python, .Net C#, JavaScript, and TypeScript.
 
Puppeteer supports only JavaScript.
Browser Support
 
Playwright supports three browser engines: Chromium, Firefox, and WebKit. Chromium includes the browsers Opera, Chrome, and Edge. Gecko Driver supports Firefox and Webkit is behind Apple Safari.    
 
Puppeteer supports generic javascript test frameworks like Jest or Mocha.
 
Test Framework
 
The Playwright supports Mocha, Jest, Jasmine, and AVA.  
 
Puppeteer supports generic javascript test framework like Jest or Mocha.
 
Grid Support
 
Playwright supports sauce labs with Good Documentation.
 
Puppeteer grid support is under development. The only help is via your own docker.

 
Conceptual Difference Playwright leans heavily on the concept of browser contexts.  Puppeteer controls Chrome using the nonstandard DevTools protocol and talks to the browser directly.
Waits Better support for Automatic Waits Less Support for Automatic Waits
Documentation Good Better Official Documentation than Playwright
Locators Better Support Limited Support
GitHub Stats As of May 24, 2022, 38.3k starts and 1.7k forks on GitHub Puppeteer has more adoption than Playwright, with total stars of 78.1k and 8.3k forks.

We can not say which one is better since both tools are new and from top technology companies, we can expect anything in the future. However, Playwright is aggressive in delivering new features and evolved a lot within a couple of years. 

Video Tutorial: Playwright vs Puppeteer

Tags
Submitted by arilio666 on April 25, 2022

Ashwin is working with iVagus as a Technical Lead. He has experience in various technologies like Cypress, JavaScript, TypeScript, Rest Assured, Selenium, Cucumber, and Java.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.