Puppeteer
Test automation · Free
A library for controlling Chrome and Firefox from Node.js: it automates browsers, screenshots, and PDF generation for tests and backend tasks.
Also known as: puppeteer/puppeteer; puppeteer; chrome-headless-api; firefox-headless-api

What you can use for free
Code and local use under Apache-2.0.
Paid features and costs
Computing resources, self-hosting, and external services are paid for separately if used.
Access and limitations
Code and local use under Apache-2.0. Computing resources, self-hosting, and external services are paid for separately if used.
Use cases
- Automate a browser screenshot or PDF
- Connect browser operations to the scenario's screenshot/PDF output
Example workflow
A possible workflow; this is not a report of hands-on testing.
Automate a browser screenshot or PDF.
Before you start
- One important workflow and its expected result.
- A test environment with controlled data.
Steps
- Define page navigation and content readiness conditions.
- Connect browser operations to the scenario's screenshot/PDF output.
- Run the check locally and save the report in CI.
Check your result
- The check detects a deliberately broken workflow.
- The result can be reproduced without depending on a personal session.
Choosing Puppeteer
Automate a browser screenshot or PDF
Choose this when
- Automate a browser screenshot or PDF
- Connect browser operations to the scenario's screenshot/PDF output
Consider alternatives when
- When choosing for this topic, compare Puppeteer with Cypress. A candidate to compare under the topic: Testing and diagnostics. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- When choosing for this topic, compare Puppeteer with Playwright. A candidate to compare under the topic: Testing and diagnostics. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
Requirements
- Choose puppeteer with managed browser downloading, or puppeteer-core and explicitly provide a suitable browser.
Things to consider
- Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
- Terms of use: Apache-2.0 for the code; third-party components retain their own terms.
- If the package manager did not execute the installation script, Puppeteer may be installed without the required browser.
Frequently asked questions
What can you use for free in Puppeteer?
Code and local use under Apache-2.0.
What additional costs might arise with Puppeteer?
Computing resources, self-hosting, and external services are paid for separately if used.
What terms of use matter for Puppeteer?
Apache-2.0 for the code; third-party components retain their own terms.
How do you get started with Puppeteer?
Define page navigation and content readiness conditions. Connect browser operations to the scenario's screenshot/PDF output. Run the check locally and save the report in CI.
How does installing puppeteer differ from puppeteer-core?
The README states that puppeteer downloads compatible Chrome during installation, while puppeteer-core does not download a browser. With install scripts disabled, install the browser separately. Successful npm package installation does not establish that automation can launch a browser.
Related tasks and approaches
- Cypress
A candidate to compare under the topic: Testing and diagnostics. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- Playwright
A candidate to compare under the topic: Testing and diagnostics. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- Selenium
A candidate to compare under the topic: Testing and diagnostics. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
License
Apache-2.0 for the code; third-party components retain their own terms.
Apache 2.0 — permissive license with patent terms
You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.
License termsTechnologies and topics
- Puppeteer
- test
- Development