Skip to content


85,153 28 295 Apache-2.0
21.5.2 (15 Nov 2023) Mar 23 2013 22.4 million (month)

Puppeteer is a Node.js library that provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. It allows you to automate browser tasks such as generating screenshots, creating PDFs, and testing web pages by simulating user interactions.

Puppeteer is commonly used for web scraping, end-to-end testing, and browser automation.

Puppeteer is one of the most popular browser automation toolkits though it's only available in NodeJS. It offers asynchronous API which enables easy asynchronous scaling.

Example Use

const puppeteer = require('puppeteer');

(async () => {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    // go to pages
    await page.goto('');
    // take a screenshot
    await page.screenshot({path: 'example.png'});
    // fill in the form
    await page.type('input[name="name"]', 'John Doe');
    await page.type('input[name="email"]', '');
    await'select[name="country"]', 'US');

    // submit the form

    // wait for the page to load after the form is submitted
    await page.waitForNavigation();

    // take a screenshot
    await page.screenshot({path: 'form-submission.png'});

    await browser.close();

Alternatives / Similar

186 1.0.0-beta8.4 (5 months ago) Apr 18 2019 compare

Other Languages