You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@puppeteer/browsers

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@puppeteer/browsers

Download and launch browsers


Version published
Weekly downloads
4.1M
decreased by-7.15%
Maintainers
2
Created
Weekly downloads
 

Package description

What is @puppeteer/browsers?

@puppeteer/browsers is a package that provides tools for managing browser binaries for Puppeteer. It allows you to download, install, and manage different versions of browsers like Chrome and Firefox, which can be used with Puppeteer for web scraping, automated testing, and other browser automation tasks.

What are @puppeteer/browsers's main functionalities?

Download a specific browser version

This feature allows you to download a specific version of a browser. In this example, it downloads Chrome version 91.0.4472.124.

const { downloadBrowser } = require('@puppeteer/browsers');

(async () => {
  await downloadBrowser('chrome', '91.0.4472.124');
})();

List available browser versions

This feature lists all available versions of a specified browser. In this example, it lists all available versions of Chrome.

const { listBrowserVersions } = require('@puppeteer/browsers');

(async () => {
  const versions = await listBrowserVersions('chrome');
  console.log(versions);
})();

Install a browser

This feature installs a specified version of a browser. In this example, it installs Firefox version 89.0.

const { installBrowser } = require('@puppeteer/browsers');

(async () => {
  await installBrowser('firefox', '89.0');
})();

Other packages similar to @puppeteer/browsers

Readme

Source

@puppeteer/browsers

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

CLI

Use npx to run the CLI:

npx @puppeteer/browsers --help

CLI 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

Known limitations

  1. We support installing and running Firefox, Chrome and Chromium. The latest, beta, dev, canary, stable keywords are only supported for the install command. For the launch command you need to specify an exact build ID. The build ID is provided by the install command (see npx @puppeteer/browsers install --help for the format).
  2. 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.

Keywords

FAQs

Package last updated on 25 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc