Code Qualityintermediate

Puppeteer vs Playwright

Puppeteer vs Playwright compared for 2026: Puppeteer 25.19 (Google's Chrome and Firefox automation library) vs Playwright 1.65 (Microsoft's cross-browser automation library and test runner). Includes our auto-waiting tests on tricky pages, launch and scraping speed on the same Chrome binary, request blocking, screenshots and PDFs, browser support, and when to pick each.

Quick Answer

Puppeteer and Playwright both drive real browsers from code, and their APIs look alike; Playwright's migration guide says most Puppeteer APIs can be used as is. They have drifted apart. Puppeteer 25.19.0 (25 November 2026) is a JavaScript library for Chrome and Firefox, speaking the Chrome DevTools Protocol or WebDriver BiDi, with no test runner. Playwright 1.65.1 (13 November 2026) drives Chromium, Firefox and WebKit, has official Python, Java and .NET versions, and ships a full test runner. In our runs on 30 November 2026, using one Chrome for Testing 153 binary for both, Playwright's locator.click waited for an overlay to disappear before clicking, while Puppeteer's locator clicked the overlay; Playwright also refused an ambiguous selector that matched two buttons, where Puppeteer clicked the first. Puppeteer was faster for scraping: 100 pages took 5.4-6.1 s against 6.4-6.9 s, and with images blocked 4.9 s against 6.8-7.1 s. Playwright launched faster (403-416 ms against 511-527 ms median) and produced PDFs faster. Pick Playwright for end-to-end testing and cross-browser work; Puppeteer suits Chrome-centric scraping, PDF and screenshot services and CDP-level control.

Last updated November 30, 2026. Covers Puppeteer 25.19.0 (25 November 2026) and Playwright 1.65.1 (13 November 2026); npm registry metadata, GitHub releases, Puppeteer docs (page interactions, supported browsers, WebDriver BiDi) and Playwright docs (actionability, browsers, languages, migrating from Puppeteer) read on 30 November 2026, plus auto-waiting, launch, scraping, blocking, concurrency, screenshot and PDF runs we did that day.

Feature comparison of Puppeteer vs Playwright
FeaturePuppeteerPlaywright
Licence & Repository
Apache-2.0; puppeteer/puppeteer, ~95.9k stars
Apache-2.0; microsoft/playwright, ~101.4k stars
Latest Release (Nov 2026)
25.19.0 on 25 Nov 2026
1.65.1 on 13 Nov 2026
Browsers
Chrome (CfT 158 pinned), Firefox 161
Chromium, Firefox, WebKit; Chrome and Edge via channel
Protocol
CDP (Chrome default) or WebDriver BiDi (Firefox default)
CDP for Chromium; patched protocols for Firefox and WebKit
Official Languages
JavaScript / TypeScript only
JS/TS, Python, Java, .NET
Built-in Test Runner
Our Run: npm Install Without Browsers
27 packages, 33.9 MB (plus browser download)
2 packages, 19.2 MB (plus browser download)
Requirements
Node.js >= 22.12; ESM-only packages since 25.0.0
Node.js >= 20
Our Run: Launch as root (container)
Failed: needs --no-sandbox
Launched (no Chromium sandbox by default)
Our Run: Element Appears After 500 ms
page.click failed in 40 ms; locator waited and clicked
locator.click and page.click both waited
Our Run: Button Covered by an Overlay
Locator clicked the overlay
Waited until the overlay was gone, clicked the button
Our Run: Selector Matches 2 Elements
Clicked the first match
locator: strict mode violation error; page.click: first match
Shadow DOM Selectors
>>> or pierce/ prefix; plain CSS returned null
CSS pierces open shadow roots by default
Accessible-Name Selectors
::-p-aria(...) and ::-p-text(...) selectors
getByRole, getByLabel, getByText; ariaSnapshot()
Our Run: Launch + Page + Close (median)
511-527 ms full Chrome; 220-232 ms headless shell
403-416 ms full Chrome; 174-187 ms headless shell
Our Run: 100 Pages Sequential
5,397-6,124 ms
6,443-6,874 ms
Our Run: 100 Pages, Images Blocked
4,860-4,886 ms (setRequestInterception)
6,799-7,101 ms route('**/*'); 6,488-6,566 ms '**/*.png'
Our Run: 10 Contexts x 10 Pages
5,944-6,161 ms
5,948-6,108 ms
Our Run: 10 PDFs / 20 Screenshots
PDFs 301-302 ms; screenshots 1,257-1,263 ms
PDFs 197-215 ms; screenshots 1,162-1,233 ms
Release Activity (2026)
25.0.1 to 25.19.0 (May-Nov 2026), about weekly
1.58.0 to 1.65.1 (Jan-Nov 2026), about monthly

Puppeteer

Puppeteer is a JavaScript library from Google for controlling Chrome or Firefox. It talks to Chrome over the Chrome DevTools Protocol by default and to Firefox over WebDriver BiDi, the W3C cross-browser protocol, which it can also use with Chrome. Installing the puppeteer package downloads a matching Chrome for Testing build (version 158.0.8127.88 for Puppeteer 25.19.0, with Firefox 161.0 as the supported Firefox), while puppeteer-core installs the library only. Common uses are scraping, generating PDFs and screenshots, prerendering single-page apps, testing Chrome extensions and capturing performance traces. The recommended interaction API is the Locator, introduced alongside the older page.click and ElementHandle methods, which waits for an element to be in the viewport, visible, enabled and stable before acting. Puppeteer 25.0.0 (12 May 2026) moved the packages to ESM only and raised the minimum Node.js version to 22; releases since then have landed roughly weekly, adding HTTPResponse.stream(), request and console events on Browser and BrowserContext (25.17.0) and Target.close() (25.19.0). Puppeteer has no test runner; teams pair it with Jest, Vitest or Node's test runner.

Pros

  • Fastest for our scraping loop: 100 pages in 5.4-6.1 s against 6.4-6.9 s for Playwright, and 4.9 s against 6.8-7.1 s with images blocked
  • Request interception with resourceType() is cheap: blocking images cut our run from 5.4-6.1 s to 4.9 s
  • Direct, documented access to the Chrome DevTools Protocol for tracing, coverage and other Chrome-only features
  • Lighter to import: 96-111 ms against 269-314 ms for Playwright
  • Firefox support over WebDriver BiDi without patched browser builds
  • Very active: six releases between 20 October and 25 November 2026, each tracking a new Chrome or Firefox

Cons

  • Its locator clicked a full-page overlay instead of the button underneath; it checks visibility and stability, not whether the element receives the click
  • No strictness: a selector matching two buttons silently clicked the first
  • The older page.click failed immediately ('No element found') on an element that appeared 500 ms later, and silently did nothing on a disabled button
  • No WebKit or Safari engine, no official Python, Java or .NET versions, and no test runner
  • Launching as root in a container failed until we added --no-sandbox

Best For

Chrome-centric scraping and crawling, PDF and screenshot services, prerendering, Chrome extension testing and anything that needs raw DevTools Protocol access from Node.js.

Playwright

Playwright is Microsoft's browser automation framework. One API drives Chromium, Firefox and WebKit, plus installed Google Chrome and Microsoft Edge through the channel option, with official libraries for JavaScript and TypeScript, Python, Java and .NET. The Firefox and WebKit builds are patched, so Playwright downloads its own browsers instead of using branded Firefox or Safari, and headless Chromium runs on a separate headless shell build by default. Interaction goes through locators: page.getByRole('button', { name: 'Sign in' }) or page.locator('css'), and every action runs actionability checks first, waiting until the element is the only match, visible, stable, receiving events, enabled and not inert. The @playwright/test runner adds parallel workers, fixtures, retries, auto-retrying assertions, traces, an HTML report and UI mode. Version 1.64.0 (7 October 2026) added WebMCP access and custom video frame rates; 1.65.0 (5 November 2026) runs the test runner under Bun with the --bun flag and added a failures-only reporter and test locks. Playwright also ships an MCP server and a CLI aimed at AI agents.

Pros

  • Actionability checks prevented both mis-clicks we set up: it waited out an overlay and rejected a selector matching two buttons (strict mode violation in 35 ms)
  • Chromium, Firefox and WebKit from one API, plus official Python, Java and .NET libraries
  • A complete test runner with parallelism, retries, traces, auto-retrying assertions and an HTML report
  • Faster launches in our runs: 403-416 ms median for full Chrome and 174-187 ms for the headless shell
  • Accessibility-first locators (getByRole, getByLabel) and ariaSnapshot() for structural assertions
  • CSS selectors pierce open shadow roots without special syntax

Cons

  • Slower in our scraping loop: 100 pages took 6.4-6.9 s against 5.4-6.1 s for Puppeteer
  • Route handlers are expensive for blocking: routing every request made the run slower (6.8-7.1 s), not faster
  • Firefox and WebKit are patched builds, so you cannot test the branded Firefox or Safari you ship to
  • Heavier import (269-314 ms) and each version expects its own browser builds to be downloaded
  • Its waits clicked a late-appearing button later than Puppeteer's locator in our runs (about 0.8 s against 0.6 s after load)

Best For

End-to-end testing of web apps, cross-browser coverage including WebKit, teams writing tests in Python, Java or .NET, and automation where reliable clicks matter more than raw throughput.

Same roots, different goals

Puppeteer is Google's Node.js automation library and the older of the two; Playwright, from Microsoft, kept a familiar API, and its migration guide maps most Puppeteer calls one to one. The scope has diverged since. Puppeteer describes itself as a library to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi, and stays a library: no test runner, JavaScript only, and a browser version pinned per release (Chrome for Testing 158.0.8127.88 and Firefox 161.0 for 25.19.0). Its Firefox support uses WebDriver BiDi, so it works with stock Firefox, but the BiDi docs list features that throw UnsupportedOperation there, including tracing, coverage, accessibility snapshots, several emulation methods and HTTPResponse.buffer(). Playwright is a testing platform. It drives Chromium, patched Firefox and WebKit builds, branded Chrome and Edge via channels, runs on Node.js, Python, Java and .NET, and ships @playwright/test with workers, fixtures, retries, web-first assertions, traces and an HTML report. Its WebKit support is the reason many teams choose it: Puppeteer has no Safari engine at all. The cost is that Playwright's Firefox and WebKit are not the browsers your users run; the Playwright browser docs say it does not work with branded Firefox or Safari because it relies on patches. Release cadence differs too: Puppeteer shipped six releases between 20 October and 25 November 2026, Playwright about one minor release a month.

Auto-waiting: what each one clicked on our tricky pages

We served five small pages locally and clicked a button on each with both tools, using one Chrome for Testing 153.0.8010.12 binary. When the button was added 500 ms after load, Puppeteer's legacy page.click failed in 40 ms with 'No element found for selector', while page.locator().click(), Playwright's locator.click and Playwright's page.click all waited and clicked. When the button started disabled and was enabled after 500 ms, legacy page.click returned without error and nothing happened; both locators waited and clicked. The page that separated them had a transparent full-screen overlay removed after 500 ms. Puppeteer's legacy click and its locator both clicked the overlay. Playwright waited until the button received events, then clicked it. Puppeteer's docs list the locator's checks as in viewport, visible, enabled and stable over two animation frames; Playwright adds 'receives events' and 'not inert', and that extra check is what mattered here. On a page with two buttons matching the same selector, Puppeteer clicked the first, and Playwright's locator threw 'strict mode violation: resolved to 2 elements' in 35 ms; Playwright's older page.click also took the first match. A button sliding across the screen was clicked correctly by all four methods. Shadow DOM differs as well: Playwright's CSS pierced an open shadow root, while Puppeteer returned null for the plain selector and found the element with the >>> or pierce/ prefix.

Speed and resources on the same Chrome binary

To compare the libraries rather than the browsers, both drove the same Chrome binary in a 2-vCPU sandbox against a local server, two rounds each. Launching Chrome, opening a page, loading it and closing took a median of 511-527 ms with Puppeteer and 403-416 ms with Playwright over eight launches; with the chrome-headless-shell build, 220-232 ms against 174-187 ms. Loading 100 product pages in sequence and reading two text fields from each took 5,397-6,124 ms with Puppeteer and 6,443-6,874 ms with Playwright. Blocking images changed the picture more: Puppeteer's setRequestInterception with resourceType() brought the run down to 4,860-4,886 ms, while Playwright's route('**/*') handler that aborted images made it slower, at 6,799-7,101 ms, because every request makes a round trip through the handler; a narrow route('**/*.png') glob came to 6,488-6,566 ms. Ten browser contexts loading ten pages each in parallel took about the same time with both, 5.9-6.2 s, and the summed RSS of the browser processes was 2,294-2,302 MB against 2,165-2,169 MB, a figure that double-counts shared memory but is comparable between the two. Twenty full-page screenshots took 1,257-1,263 ms against 1,162-1,233 ms, and ten PDFs 301-302 ms against 197-215 ms. Importing the library took 96-111 ms for Puppeteer and 269-314 ms for Playwright.

Installs, browsers and running in containers

Both packages download browsers on install, and that is where most operational trouble starts. The puppeteer package runs a postinstall script that fetches the pinned Chrome for Testing build into a cache, and puppeteer-core skips that so you can point executablePath at a browser you manage. Without browsers, our install was 27 packages and 33.9 MB for Puppeteer and 2 packages and 19.2 MB for Playwright. Playwright installs browsers with npx playwright install, and each Playwright version expects specific builds: 1.65.1 tried to fetch Chrome for Testing 159.0.8154.6, Chromium revision 1255, in our sandbox. Its docs recommend --only-shell when you only run headless Chromium, and point out that headless mode uses the separate chromium headless shell unless you select the 'chromium' channel for Chrome's new headless mode, so behaviour can differ from headed runs. Both downloads were blocked by our sandbox's network allowlist, a reminder to bake browsers into CI images rather than fetch them per job. Running as root in a container, Puppeteer's launch failed with 'Running as root without --no-sandbox is not supported', while Playwright started because it disables the Chromium sandbox by default. Requirements: Puppeteer 25 is ESM-only and needs Node.js 22.12 or later, though require() still worked on Node.js 22.23.5; Playwright 1.65 needs Node.js 20 or later.

When not to use each, and migrating

Do not choose Puppeteer for a cross-browser test suite: it cannot run WebKit, its Firefox path lacks several features over BiDi, and you will build the runner, retries, reporting and tracing yourself. Do not trust its clicks blindly on pages with modals, cookie banners or loading overlays, since our locator clicked an overlay that Playwright waited out. Do not choose Playwright when you need the branded Firefox or Safari your users run, when you want stock Chrome's exact behaviour in headless mode without opting into the 'chromium' channel, or when a high-volume scraper is sensitive to per-request overhead in route handlers. For PDF or screenshot microservices, both work; Playwright was quicker at PDFs in our test, Puppeteer lighter to import. Migration from Puppeteer to Playwright is well documented: Playwright's guide maps launch, newContext, setViewportSize, waitForLoadState('networkidle'), locators and cookie methods one to one, and recommends dropping ElementHandle and explicit waits in favour of locators and assertions. Going the other way usually means adding a test runner and replacing getByRole calls with Puppeteer's ::-p-aria() selectors, which worked for both a button name and a labelled textbox in our run. Whatever you pick, pin the library and browser versions together, keep browsers in your image, and run headless and headed at least once before trusting a flaky-looking test.

Verdict

Pick Playwright for testing. Its locators refuse to click the wrong thing: in our runs it waited for an overlay to disappear and rejected a selector that matched two buttons, both cases where Puppeteer clicked something else without complaint. Add WebKit and Firefox coverage from one API, a test runner with retries, traces and assertions, and official Python, Java and .NET libraries, and it is the default choice for end-to-end tests in 2026. Pick Puppeteer when the job is driving Chrome at volume rather than asserting on an app: scraping, crawling, PDF or screenshot generation and prerendering. On the same Chrome binary it was faster through our 100-page loop (5.4-6.1 s against 6.4-6.9 s), blocking images was cheap with request interception (4.9 s), it imports in a third of the time, and it gives direct access to the DevTools Protocol. If you use Puppeteer, use page.locator() rather than page.click(), and check for overlays yourself, because its locator does not test whether the element receives the click. If you use Playwright for scraping, block resources with narrow route globs or context options rather than a catch-all handler, which slowed our run. Teams already on one tool should migrate only for a concrete reason: WebKit coverage or a test runner points to Playwright, Firefox-over-BiDi or CDP depth points to Puppeteer.

All Comparisons

Puppeteer vs Playwright — FAQ

Common questions answered from the comparison above

Is Playwright better than Puppeteer?

For testing, usually yes: it supports Chromium, Firefox and WebKit, ships a test runner, and its actionability checks avoided both mis-clicks in our tests. For Chrome-only scraping and PDF work Puppeteer was faster in our runs and gives direct DevTools Protocol access.

Is Puppeteer faster than Playwright?

In our scraping loop on the same Chrome binary, yes: 100 pages took 5.4-6.1 s with Puppeteer and 6.4-6.9 s with Playwright, and 4.9 s against 6.8-7.1 s with images blocked. Playwright launched faster (403-416 ms against 511-527 ms median) and produced PDFs faster.

Does Puppeteer support Firefox and Safari?

Puppeteer supports Firefox over WebDriver BiDi (Firefox 161.0 for version 25.19.0), with some features unavailable there. It does not support WebKit or Safari. Playwright supports WebKit through its own patched builds.

Does Puppeteer auto-wait like Playwright?

Its locator API does: page.locator().click() waits for the element to be visible, enabled and stable. It does not check that the element receives the click, so in our test it clicked a covering overlay, and the older page.click does not wait at all.

Can I use Playwright with Python or Java?

Yes. Playwright has official libraries for JavaScript and TypeScript, Python (with a pytest plugin), Java and .NET. Puppeteer is JavaScript and TypeScript only.

Why does Puppeteer fail to launch in Docker as root?

Chrome refuses to start its sandbox as root; in our run Puppeteer failed with 'Running as root without --no-sandbox is not supported' until we passed args: ['--no-sandbox']. Playwright disables the Chromium sandbox by default, so it launched without changes.

Get the next comparison by email

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.