Skip to content
pubscout

puppeteer

3.28.0, released 3 weeks ago by xaha.dev

A Dart port of Puppeteer to automate and control Chrome over the DevTools Protocol.

WASM-readyRock solid
$ flutter pub add puppeteer
Source repository

What it does

Allows developers to automate browser tasks like generating screenshots and PDFs, crawling SPAs, automating form submissions, and running UI tests directly in Chrome. It also includes a fully typed API of the Chrome DevTools protocol generated from JSON Schema.

AI-written summary of version 3.28.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to automate browser interactions or scrape single-page applications.
  • You want to generate screenshots or PDFs of web pages programmatically.
  • You need to run automated browser and extension tests.

Skip it when

  • You are running on web/WASM where browser launching (`puppeteer.launch()`) is unsupported.
  • You only need to make simple HTTP requests without running a browser engine.

Strengths

  • High-level API very similar to the original Node.js Puppeteer library.
  • Full access to the low-level Chrome DevTools protocol.
  • Supports browser extensions and advanced features like locators and screencasts.

Weaknesses

  • Launching a local browser instance is not supported on web/WASM platforms.
  • Requires managing browser binaries and processes.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
9

Can automatically download and launch Chrome binaries on native platforms.

import 'package:puppeteer/puppeteer.dart';

void main() async {
  var browser = await puppeteer.launch();
  var page = await browser.newPage();
  await page.goto('https://pub.dev');
  await page.screenshot(output: File('screenshot.png').openWrite());
  await browser.close();
}

Alternatives

Packages that do the same job and could replace puppeteer.

  • encrypter_plus

    High-level APIs over PointyCastle for two-way cryptography, supporting AES, RSA, Salsa20, and Fernet.

  • zxcvbn

    Dart port of Dropbox's zxcvbn password strength estimator library.

  • encrypt

    High‑level Dart APIs for encryption, decryption, signing and secure random generation.

Works with

Packages commonly used together with puppeteer: ones it builds on, ones built on it, and its own family.