1. @puppeteer/browsers
Download and launch browsers
@puppeteer/browsers
Package: @puppeteer/browsers
Created by: puppeteer
Last modified: Thu, 25 Apr 2024 10:21:13 GMT
Version: 2.2.3
License: Apache-2.0
Downloads: 13,722,313
Repository: https://github.com/puppeteer/puppeteer

Install

npm install @puppeteer/browsers
yarn add @puppeteer/browsers

@puppeteer/browsers

Manage and launch browsers/drivers from a CLI or programmatically.

CLI

Use npx to run the CLI:

 npx @puppeteer/browsers --help

Built-in per-command help will provide all documentation you need to use the CLI.

 npx @puppeteer/browsers --help # help for all commands
npx @puppeteer/browsers install --help # help for the install command
npx @puppeteer/browsers launch --help # help for the launch command

Some example to give an idea of what the CLI looks like (use the --help command for more examples):

 # Download the latest available Chrome for Testing binary corresponding to the Stable channel.
npx @puppeteer/browsers install chrome@stable

# Download a specific Chrome for Testing version.
npx @puppeteer/browsers install [email protected]

# Download the latest Chrome for Testing version for the given milestone.
npx @puppeteer/browsers install chrome@117

# Download the latest available ChromeDriver version corresponding to the Canary channel.
npx @puppeteer/browsers install chromedriver@canary

# Download a specific ChromeDriver version.
npx @puppeteer/browsers install [email protected]

Known limitations

  1. Launching the system browsers is only possible for Chrome/Chromium.

API

The programmatic API allows installing and launching browsers from your code. See the test folder for examples on how to use the install, canInstall, launch, computeExecutablePath, computeSystemExecutablePath and other methods.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code