Need advice about which tool to choose?Ask the StackShare community!

Playwright

196
370
+ 1
66
Puppeteer

407
526
+ 1
25
Add tool

Puppeteer vs Playwright: What are the differences?

Developers describe Puppeteer as "Headless Chrome Node API". Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome. On the other hand, Playwright is detailed as "Node library to automate Chromium, Firefox and WebKit with a single API (By Microsoft)". It is a Node library to automate the Chromium, WebKit and Firefox browsers with a single API. It enables cross-browser web automation that is ever-green, capable, reliable and fast.

Puppeteer and Playwright are primarily classified as "Headless Browsers" and "Browser Testing" tools respectively.

Puppeteer and Playwright are both open source tools. It seems that Puppeteer with 59.9K GitHub stars and 6.1K forks on GitHub has more adoption than Playwright with 10.9K GitHub stars and 282 GitHub forks.

Advice on Playwright and Puppeteer
Ankur Loriya
Needs advice
on
PhantomJSPhantomJS
and
PuppeteerPuppeteer

I am using Node 12 for server scripting and have a function to generate PDF and send it to a browser. Currently, we are using PhantomJS to generate a PDF. Some web post shows that we can achieve PDF generation using Puppeteer. I was a bit confused. Should we move to puppeteerJS? Which one is better with NodeJS for generating PDF?

See more
Replies (2)
Recommends
PuppeteerPuppeteer

You better go with puppeteer. It is basically chrome automation tool, written in nodejs. So what you get is PDF, generated by chrome itself. I guess there is hardly better PDF generation tool for the web. Phantomjs is already more or less outdated as technology. It uses some old webkit port that's quite behind in terms of standards and features. It can be replaced with puppeteer for every single task.

See more
Recommends
PuppeteerPuppeteer

I suggest puppeteer to go for. It is simple and easy to set up. Only limitaiton is it can be used only for chrome browser and currently they are looking into expanding into FF. The next thing is Playwright which is just a scale up of Puppeteer. It supports cross browsers.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Playwright
Pros of Puppeteer
  • 12
    Cross browser
  • 8
    Test Runner with Playwright/test
  • 8
    Open source
  • 7
    Promise based
  • 6
    Well documented
  • 4
    Execute tests in parallel
  • 4
    Integrate your POMs as extensible fixtures
  • 4
    Capture videos, screenshots and other artifacts on fail
  • 4
    API Testing
  • 3
    Context isolation
  • 3
    Python Support
  • 3
    Inbuild reporters html,line,dot,json
  • 10
    Scriptable web browser
  • 9
    Very well documented
  • 6
    Promise based

Sign up to add or upvote prosMake informed product decisions

Cons of Playwright
Cons of Puppeteer
  • 9
    Less help
  • 1
    Does not execute outside of browser
  • 1
    Node based
  • 10
    Chrome only

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is Playwright?

It is a Node library to automate the Chromium, WebKit and Firefox browsers with a single API. It enables cross-browser web automation that is ever-green, capable, reliable and fast.

What is Puppeteer?

Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Playwright?
What companies use Puppeteer?
See which teams inside your own company are using Playwright or Puppeteer.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Playwright?
What tools integrate with Puppeteer?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

What are some alternatives to Playwright and Puppeteer?
Selenium
Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
Protractor
Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.
Cypress
Cypress is a front end automated testing application created for the modern web. Cypress is built on a new architecture and runs in the same run-loop as the application being tested. As a result Cypress provides better, faster, and more reliable testing for anything that runs in a browser. Cypress works on any front-end framework or website.
TestCafe
It is a pure node.js end-to-end solution for testing web apps. It takes care of all the stages: starting browsers, running tests, gathering test results and generating reports.
WebdriverIO
WebdriverIO lets you control a browser or a mobile application with just a few lines of code. Your test code will look simple, concise and easy to read.
See all alternatives