Skip to main content
Puppeteer is Google’s Node.js library for controlling Chrome/Chromium via the DevTools Protocol.

Installation

Use puppeteer-core instead of puppeteer — Driver provides the browser, so you don’t need Puppeteer to download one.

Quick Start

TypeScript

With Session Options

TypeScript

Taking Screenshots

TypeScript

Generating PDFs

TypeScript

With Persistent Profiles

TypeScript

Error Handling

TypeScript

Tips

  • Use browser.disconnect() instead of browser.close() to keep the remote session running
  • Use hosted sessions for predictable managed Chrome infrastructure