Skip to content

Puppeteer

Open-source Node.js library for automating and controlling Chrome or Chromium.

Self-hostedNot yet verified
Report issueDemo online
Apache-2.0★ 95461

Open the official app on pptr.dev

This tool is hosted by its maintainers. Click below to open pptr.dev in a new tab — it's their official demo.

Browse developer tools →

What's next with Puppeteer?

Choose how you want to get started.

Use it free

Open the official tool or demo — no account needed.

Free

Self-host it

Run the open-source version on your own infrastructure.

Open

What is Puppeteer?

Puppeteer is an open-source JavaScript library designed to automate interactions with Chrome and Firefox browsers using the Chrome DevTools Protocol and WebDriver BiDi. Developed under the Apache-2.0 license, it provides a high-level API for tasks such as generating screenshots, creating PDFs, and testing complex web interfaces. Widely adopted by developers, QA engineers, and DevOps teams, Puppeteer streamlines repetitive browser automation workflows, eliminating the need for manual testing or third-party tools. Its ability to handle dynamic content, simulate user behavior, and analyze performance makes it a critical tool for modern web development and testing. The project addresses challenges like inconsistent browser behavior, manual test fatigue, and the complexity of headless automation, offering a reliable solution for both local and CI/CD environments.

How it works

Puppeteer is a JavaScript library that controls Chrome or Firefox browsers through the DevTools Protocol or WebDriver BiDi. It enables developers to automate tasks like navigation, interaction with DOM elements, and performance analysis. The tool is primarily used for testing web applications, generating content, and automating browser-based workflows. Its headless mode allows execution without a visible UI, making it ideal for CI/CD pipelines and server environments. Puppeteer supports advanced features such as taking screenshots of pages, generating PDFs, and interacting with dynamic content like AJAX-loaded elements. It also provides tools for performance auditing and analyzing network requests.

How to use it

  1. 1Install Puppeteer via npm, yarn, pnpm, or bun, which automatically downloads compatible Chrome or Firefox binaries. Use `npm install puppeteer` for full browser inclusion or `npm install puppeteer-core` for a lightweight core library.
  2. 2Initialize a browser instance using `puppeteer.launch()` and create a page context with `browser.newPage()` to interact with web pages.
  3. 3Navigate to a URL with `page.goto()`, execute JavaScript via `page.evaluate()`, or trigger events like clicks and form submissions.
  4. 4Close the browser session with `browser.close()` after completing tasks. For headless execution, set `headless: true` in the launch options. Practical tips: Manually download browsers if dependency scripts are blocked. Use Puppeteer Core for environments where browser binaries cannot be installed.

What it can do

  • browser automation

Use cases

Assumptions and limitations

Assumptions

  • source: https://github.com/puppeteer/puppeteer
  • license: Apache-2.0 — free to use
  • privacy: Self-hosted — you control your data

Limitations

  • Requires Chrome or Firefox browsers, limiting support for other engines
  • Headless mode may fail to render certain CSS or JavaScript features accurately
  • Browser binaries are large, increasing installation complexity
  • Manual browser downloads are necessary if dependency scripts are blocked
  • Limited support for newer browser features without frequent updates

Understanding the result

Open-source Node.js library for automating and controlling Chrome or Chromium.

Tool details

  • Clearly flagged when a network request is needed.
  • No account, no sign-up, and no tracking of your content.
  • Powered by (Apache-2.0).
Built with
(puppeteer/puppeteer)
License
Apache-2.0
Runs locally
No — requires a network request
Verification
Not yet verified
Input
Query
Output
Text
Open-source source & license

Built with puppeteer/puppeteer. OpenToolVault provides the discovery and browser interface while crediting the original project maintainers.

Built with
License
Apache-2.0
View source on GitHub

Open-source project

OpenToolVault is an independent directory. We are not affiliated with or endorsed by this project.

References

Frequently asked

How do I install Puppeteer and its dependencies?

Install Puppeteer using npm, yarn, pnpm, or bun with `npm install puppeteer` (downloads Chrome) or `npm install puppeteer-core` (no browser binaries). If dependency scripts are blocked, manually download Chrome or Firefox from the official websites and place them in Puppeteer’s browser directory.

How does Puppeteer interact with browsers?

Puppeteer connects to Chrome or Firefox via the Chrome DevTools Protocol or WebDriver BiDi, allowing it to control browser processes, inspect DOM elements, and execute scripts. It uses a headless mode by default, which runs browsers without a visible UI while maintaining full functionality for automation tasks.

How can I generate a PDF of a webpage using Puppeteer?

Use `page.pdf()` to generate a PDF. Specify options like `format`, `printBackground`, and `margin` to customize output. Example: `await page.pdf({ path: 'output.pdf', format: 'A4' });` ensures the PDF is saved with the specified settings.

How does Puppeteer compare to Selenium?

Puppeteer is specifically designed for Chrome and Firefox, while Selenium supports multiple browsers via separate drivers. Puppeteer uses the DevTools Protocol for faster, more granular control, whereas Selenium relies on WebDriver. Puppeteer’s headless mode is more lightweight for automation tasks, but Selenium offers broader browser compatibility.

How do I resolve 'Missing Chrome executable' errors?

If Puppeteer fails to locate the Chrome binary, ensure `npm install puppeteer` was completed successfully. If the browser is not found, manually download Chrome from https://chromium.org and place it in Puppeteer’s browser directory. Alternatively, use Puppeteer Core with a manually installed browser.

Spotted something wrong with Puppeteer, or want to maintain it? See how to help.