What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To run your first Puppeteer browser script, install the puppeteer package, then launch its bundled browser, open a page, navigate to a URL, and close the browser when you are done. Puppeteer scripts use this launch–page–navigate workflow to automate browser tasks through JavaScript.
How Puppeteer scripts work
Puppeteer launches or connects to a browser, creates pages, and controls them through its API. A page is a browser tab: you can navigate it, inspect its content, and interact with elements. The basic lifecycle is launch, create a page, navigate, interact or read, then close the browser.
This guide follows Puppeteer’s official getting-started workflow. The current documentation is labelled Puppeteer 25.12.0; browser compatibility is release-specific, so check the official supported browsers table when choosing a browser version.
Install Puppeteer
For the simplest local first run, use puppeteer. Installing it downloads a compatible Chrome for Testing browser and a chrome-headless-shell binary. The official installation guide lists commands for npm, Yarn, pnpm, and Bun; for npm, run:
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
npm install puppeteer
The documentation’s approximate download estimates are 170 MB on macOS, 282 MB on Linux, and 280 MB on Windows. These are estimates, not fixed requirements. Check the current package’s Node.js engine requirement rather than assuming a minimum version.
When to use puppeteer-core
puppeteer-core provides the library without downloading a browser. Choose it when you explicitly manage the browser yourself or connect to a remote browser. That flexibility means you must provide a compatible browser setup; for a first local script, puppeteer is simpler.
Run your first browser script
Save this as first-script.mjs after installing Puppeteer:
Rank #2
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://developer.chrome.com/');
console.log(await page.title());
} finally {
await browser.close();
}
Run it with Node.js:
node first-script.mjs
The script prints the page title to the terminal. The try/finally ensures that the browser is closed even if navigation or reading the title fails.
What each awaited operation does
puppeteer.launch()starts a browser process. By default, it runs headless, without a visible window.browser.newPage()creates a new tab and returns a page object.page.goto(url)navigates that tab to the URL and waits for navigation according to the method’s default behavior.page.title()reads the page’s title after navigation.browser.close()ends the browser process and its pages.
The official guide also demonstrates setting a viewport, locating elements by accessible name or text, interacting with them, waiting for a result, and reading text from the page. Prefer Puppeteer’s locator API for element interactions in fuller scripts.
Choose the browser setup that fits
Bundled browser or system browser
The bundled Chrome for Testing is the best baseline because Puppeteer releases are paired with browser versions. The supported-browsers page currently pairs Puppeteer 25.12.0 with Chrome for Testing 154.0.8037.57 and Firefox 156.0.1. Puppeteer’s launch documentation says it works best with the bundled Chrome for Testing and does not guarantee compatibility with other Chrome versions.
If you need a system browser, configure an explicit executablePath or channel in the launch options. This gives you more control over which browser is used, but it is a compatibility trade-off: a browser version outside the documented pairing may not work as expected.
Headless or visible window
Headless is the default and is useful for scripts that run in the background. To watch the browser while learning or debugging, launch it with headless: false:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsconst browser = await puppeteer.launch({ headless: false });
The optional headless: 'shell' selects the separate chrome-headless-shell binary. Puppeteer describes it as a potentially more performant automation option when full Chrome behavior is unnecessary; use regular Chrome if you need its full behavior.
Rank #4
Troubleshoot common first-run problems
“Could not find Chrome (ver. …)”
A package manager may have skipped Puppeteer’s install script, so the package was installed but the browser was not downloaded. Install the browser explicitly:
npx puppeteer browsers install
The official installation guide gives corresponding commands for Yarn, pnpm, and Bun. Alternatively, allow Puppeteer’s install script under your package-manager policy.
The browser does not start on Linux
Linux browser startup can fail when system dependencies are missing. Puppeteer’s FAQ links to operating-system-specific troubleshooting. Its browser-management documentation provides a command to install Chrome dependencies on Ubuntu and Debian; it requires root privileges and should not be treated as a universal fix for every Linux distribution.
Best Value
A different Chrome version fails
Check the Puppeteer release against the supported browser table. For a clean baseline, use the browser downloaded with the puppeteer package before trying a system browser.
You expected a visible browser
Normal launch is headless. Set headless: false in the launch options to show a browser window.
Or skip the browser setup
If your goal is to capture a website rather than automate a browser interaction, ScreenshotNeo is a website screenshot API and MCP server: one GET request can return a PNG, JPEG, WebP, or PDF. For example, use cURL to save a WebP screenshot:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://developer.chrome.com/ -o shot.webp
See the ScreenshotNeo API documentation for setup and options. It accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response includes X-Page-Verdict and X-Billed headers. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up free for 1,000 screenshots a month, with no card required.
Where to go next
Once the first script works, add a locator-based interaction and wait for the expected page result before reading it. Puppeteer documents Chrome automation through CDP by default and production-ready WebDriver BiDi support for Chrome and Firefox from v23.0.0 onward; the supported APIs differ. See the getting-started guide for the current interaction examples and the FAQ for automation boundaries.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




