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.
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.
52Compare - zxcvbn
Dart port of Dropbox's zxcvbn password strength estimator library.
50Compare - encrypt
High‑level Dart APIs for encryption, decryption, signing and secure random generation.
30Compare
Works with
Packages commonly used together with puppeteer: ones it builds on, ones built on it, and its own family.
- archivepuppeteer depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- poolpuppeteer depends on itManage a finite pool of resources to control concurrent operations.
- petitparserpuppeteer depends on itBuild fast, composable, and type-safe grammars and parsers in plain Dart code.
- webpuppeteer depends on itLightweight bindings for browser APIs via JS interop
- asyncpuppeteer depends on itUtility classes and helpers that extend Dart's async library.
- loggingpuppeteer depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- static_shockBuilt on puppeteerA static site generator for Dart.
- whatsapp_bot_flutterBuilt on puppeteerA Flutter/Dart library to control WhatsApp Web via Puppeteer for sending messages and handling events.