Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Puppeteer, a page downloading a file and Puppeteer downloading a browser executable are two different tasks. For page downloads, configure the browser’s download policy and destination path; for the browser itself, choose between Puppeteer’s bundled installation and an externally managed executable. The examples below follow the Puppeteer 25.12.0 documentation; check the API reference for the version installed in your project.

Choose which kind of download you need

  • A page-triggered download: Your script opens a website and causes that page to download a file. Set the browser download behavior and destination.
  • A Puppeteer browser executable: Puppeteer needs a Chrome binary to launch. The puppeteer package normally installs one; puppeteer-core expects you to provide or connect to a browser.

These workflows have different settings. Installing Chrome does not set the destination for files downloaded by a page, and setting a page’s download path does not install Chrome.

Set a destination for files downloaded by a page

Puppeteer’s DownloadBehavior API reference defines a policy and a download path. The path is required when the policy is allow or allowAndName. With allowAndName, Chrome uses download GUIDs as filenames rather than the names suggested by the page.

For Puppeteer 25.12.0, a download behavior can be set through the browser’s CDP session. This example permits downloads into a directory you create before running the script:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
import puppeteer from 'puppeteer';
import { mkdir } from 'node:fs/promises';

const downloadPath = '/tmp/puppeteer-downloads';
await mkdir(downloadPath, { recursive: true });

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  const session = await page.createCDPSession();

  await session.send('Browser.setDownloadBehavior', {
    behavior: 'allow',
    downloadPath,
  });

  await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
  // Trigger the site's download action here.
  // The file is written into downloadPath.
} finally {
  await browser.close();
}

Replace the example URL and add the site-specific action that starts the download, such as clicking a download link. The API contract establishes the policy and path requirements; it does not define a universal Puppeteer-level method for waiting for, identifying, or renaming every downloaded file. If your application needs to verify completion or map a file to a particular click, use a strategy appropriate to the page and filesystem, and test it with the installed Puppeteer and browser versions.

Choosing the download policy

  • allow permits downloads and requires downloadPath.
  • allowAndName permits downloads, requires downloadPath, and stores files under download GUID names.
  • deny denies download requests.

Do not assume an unspecified policy is equivalent to allowing downloads. Set the policy explicitly when the workflow depends on a download.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Install the browser Puppeteer will launch

Installing puppeteer downloads a compatible Chrome for Testing browser and chrome-headless-shell by default. Since Puppeteer 19.0.0, the default browser cache location is $HOME/.cache/puppeteer. The installation guide documents configuration and environment variables for changing browser-management behavior: Puppeteer installation guide.

npm install puppeteer

Use this option when you want Puppeteer’s installation flow to manage the browser. puppeteer-core does not download Chrome and is intended for remote or externally managed browsers; install it when your environment supplies the browser separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
npm install puppeteer-core
Choice Browser setup Main consideration
puppeteer Installs a compatible Chrome for Testing browser and chrome-headless-shell by default. Convenient managed setup; configure its cache or installation behavior using the installation guide.
puppeteer-core Does not download Chrome. Use when connecting to a remote browser or managing the executable yourself.

When installation scripts are blocked

Some package-manager or deployment environments block install scripts, which can prevent the browser download. The installation guide includes instructions for manually installing browsers in that situation. Follow the guide for the specific package and environment rather than assuming that installing the npm package also installed a usable executable.

Launch an externally managed Chrome

If Chrome is installed elsewhere, supply its path with executablePath, or use an appropriate installed-browser channel. Puppeteer recommends setting browser when using a custom executable path. For example:

Rank #4
Sale
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({
  browser: 'chrome',
  executablePath: '/path/to/chrome',
  headless: true,
});

try {
  const page = await browser.newPage();
  await page.goto('https://example.com');
} finally {
  await browser.close();
}

Change /path/to/chrome to the actual executable path on the machine running the script. Only Puppeteer’s bundled browser is guaranteed to work; an arbitrary system Chrome version may be incompatible. The supported launch options and caveat are documented in the LaunchOptions API reference.

Pin browser builds and verify downloaded archives

For controlled installations, @puppeteer/browsers provides install options for the browser, build ID, platform, and cache directory. Pinning a build ID makes the requested browser build explicit. You can also supply an expected SHA-256 archive hash: installation fails if the downloaded archive does not match. If you omit the hash, installation proceeds without integrity verification.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.

The InstallOptions API reference documents these options. Custom browser providers are not officially supported; if you use one, compatibility, testing, and maintenance are your responsibility.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Select the headless browser mode deliberately

Puppeteer documents headless: true as the current headless mode and headless: 'shell' as the chrome-headless-shell mode. The shell does not completely match regular Chrome and may suit performance-sensitive work that does not require the complete feature set. Validate your workflow in the mode you plan to run; do not assume the two modes behave identically. See the headless modes guide.

Troubleshoot common setup failures

A download is not saved where expected

  • Confirm that the browser download behavior is set to allow or allowAndName.
  • For either allow policy, check that downloadPath is supplied and that the process can write to that directory.
  • Make sure your script actually triggers the page’s download action. The behavior setting does not initiate a download by itself.
  • If you chose allowAndName, expect GUID-based filenames rather than the page’s suggested names.

Puppeteer cannot find a browser

  • If you installed puppeteer-core, provide an executable path or connect to the externally managed or remote browser; that package does not download Chrome.
  • If you installed puppeteer but installation scripts were blocked, use the manual browser installation steps in the installation guide.
  • Check the configured browser cache location if it differs from the default $HOME/.cache/puppeteer.

A custom Chrome fails to launch or behaves differently

Check that executablePath points to the intended binary and that the chosen browser build is compatible with your Puppeteer version. Puppeteer guarantees compatibility only with its bundled browser. Also verify whether the script uses regular headless Chrome or chrome-headless-shell; their behavior is not identical.

A pinned browser installation fails hash verification

If you set expectedHash, confirm that the SHA-256 value corresponds to the archive being installed. A mismatch deliberately fails installation. If no expected hash is provided, the installation does not perform that integrity verification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

If your goal is a screenshot or PDF rather than automating a page’s file download, ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. For example, a cURL request for a WebP screenshot:

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
SaleBestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$157.73
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for API options. Before the shot, it accepts cookie/consent banners like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies its page verdict and billing status in headers. Its MCP server gives AI agents tools for screenshots, page information, and PDFs. Free includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.

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.