JavaScript API for Chrome and Firefox
Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi. Puppeteer runs in the headless (no visible UI) by default
npm i puppeteer # Downloads compatible Chrome during installation.
npm i puppeteer-core # Alternatively, install as a library, without downloading Chrome.:::note
Modern package managers (including npm (see the RFC), pnpm, Yarn, Bun, and Deno) block dependency install scripts by default. If the install script is blocked, Puppeteer will not download the browser during installation, leading to runtime errors.
You can manually download the required browsers after installation by running:
npx puppeteer browsers installAlternatively, you can configure your package manager to allow the install script to run (for example, with npm, by adding "puppeteer" to "allowScripts" in your package.json).
:::
Install chrome-devtools-mcp,
a Puppeteer-based MCP server for browser automation and debugging.
Puppeteer also supports the experimental WebMCP API.
…[Bug]: request interception leaves dedicated-worker fetches paused forever since 24.7.0 (continueRequest sent to the worker session)
Chrome Canary/Firefox Nightly test results
[Bug]: WebWorker.evaluate() and close() never settle when the worker script fails to load
[Bug]: Intercepted requests from dedicated workers are never fulfilled/continued/aborted
page.emulateMediaFeatures([{ name: 'hover', value: 'hover' }]) throws error
[Bug]: @puppeteer/browsers: Abruptly truncated downloads exit with code 0 instead of failing
[Bug]: page.goto() ignores its own timeout and never settles after a second navigation request
[Bug]: Protocol timeout when screenshotting in pretty weird case (Docker + multiple tabs + networkidle2)
Ability to exit a script while keeping browser running
[Feature]: Add an option to clear old browser versions only