Benchmark · run 2026-11-21 · 10 runs per task per library
Round 0: Playwright vs Puppeteer on 10 scripted browser tasks
Before we benchmark AI browser agents, we need a baseline: how fast and how reliable are the two most common automation libraries when they drive exactly the same browser through the same tasks?
Short answer: both libraries passed 100/100 (Playwright) and 100/100 (Puppeteer) runs. Puppeteer's median was lower on 9 of 10 tasks and Playwright's on 1; the median gap per task ranged from 0.1% to 5.5%, and the min–max ranges of the two libraries overlap on every task. In practice task time here is dominated by the network and the sites, not the library. Playwright launched the browser faster (median 32 ms vs 56 ms).
Setup
- Libraries: playwright-core 1.65.1, puppeteer-core 25.18.1
- Browser: Google Chrome for Testing 153.0.8010.12 — the same binary for both libraries, headless
- Machine: AMD Ryzen 9 9950X3D 16-Core Processor (32 threads), Linux 7.0.0-43-generic, Node v22.23.4. The machine was also running other workloads during the run, which adds noise to both libraries equally.
- Network: residential broadband; sites are public practice sites hosted by third parties
- Procedure: each task runs in a fresh browser process and context. Library order alternates every run (odd runs Playwright first, even runs Puppeteer first) to cancel out drift on the remote sites. Timing starts after the browser has launched and stops when the success check returns. A run fails if the check returns false, an error is thrown, or 45 s pass.
- Sites: quotes.toscrape.com and books.toscrape.com (sandboxes published for scraping practice) and the-internet.herokuapp.com (a public test-automation practice app).
Results by task
| Task | Playwright pass | Playwright median ms | Puppeteer pass | Puppeteer median ms | PW vs PP |
|---|---|---|---|---|---|
quotes-loginLog in on quotes.toscrape.com (demo login accepts any credentials) and confirm the Logout link appears | 10/10 | 1,359 1,232–1,767 | 10/10 | 1,288 1,212–1,813 | +6% |
quotes-paginateFollow "Next" through every page of quotes.toscrape.com and collect all 100 quotes | 10/10 | 3,466 3,107–5,116 | 10/10 | 3,618 3,161–5,551 | -4% |
quotes-js-renderExtract the 10 quotes rendered client-side by JavaScript on quotes.toscrape.com/js/ | 10/10 | 959 898–1,263 | 10/10 | 923 860–1,281 | +4% |
quotes-infinite-scrollScroll quotes.toscrape.com/scroll until all 100 quotes have loaded | 10/10 | 2,007 1,821–2,551 | 10/10 | 1,953 1,616–2,189 | +3% |
books-categoryOpen the Travel category on books.toscrape.com and extract title + price for all 11 books | 10/10 | 996 959–1,150 | 10/10 | 964 914–1,237 | +3% |
books-detailClick the first book on books.toscrape.com and read its UPC from the product table (expected a897fe39b1053632) | 10/10 | 1,268 1,153–1,884 | 10/10 | 1,259 1,139–1,934 | +1% |
internet-dropdownSelect "Option 2" in the dropdown on the-internet.herokuapp.com/dropdown and read it back | 10/10 | 1,126 1,079–1,624 | 10/10 | 1,109 1,034–1,530 | +2% |
internet-dynamic-loadingClick Start on the-internet.herokuapp.com/dynamic_loading/2 and wait for "Hello World!" (about 5 s server delay) | 10/10 | 6,438 6,329–7,183 | 10/10 | 6,115 6,011–6,464 | +5% |
internet-checkboxesTick checkbox 1 and untick checkbox 2 on the-internet.herokuapp.com/checkboxes, then verify both states | 10/10 | 1,159 1,061–1,777 | 10/10 | 1,101 1,029–1,677 | +5% |
internet-tableExtract the 4 rows of table 1 on the-internet.herokuapp.com/tables and check every row has an email address | 10/10 | 1,026 993–1,537 | 10/10 | 1,025 977–1,764 | +0% |
Median and min–max are over successful runs only. "PW vs PP" is Playwright's median relative to Puppeteer's; negative means Playwright was faster.
Totals
| Playwright | Puppeteer | |
|---|---|---|
| Runs passed | 100/100 | 100/100 |
| Sum of per-task medians | 19,804 ms | 19,355 ms |
| Median browser launch | 32 ms | 56 ms |
What this does and doesn't tell you
- It measures library overhead plus real-world page loads on simple, stable pages. It does not measure cross-browser support (Playwright also drives Firefox and WebKit; we only used Chromium here), test-runner features, or behaviour on heavy single-page apps.
- The scripts are written idiomatically for each library, but two scripts are never perfectly equivalent. Read them and tell us if one side is handicapped — see corrections.
- One machine, one network, one day. Re-run it yourself; we would rather be checked than trusted.
Download and re-run
Also in the public repository github.com/RichardDu1/browsebench-harness (MIT).
- Raw results (JSON, every run)
- tasks.mjs — task definitions and success checks for both libraries
- run.mjs — the runner
npm i [email protected] [email protected] CHROMIUM=/path/to/chrome-headless-shell node run.mjs 10
Data licensed CC BY 4.0. Please keep the request rate to these practice sites low.