Files
puppeteer/docs/browsers-api/browsers.browserprovider.getexecutablepath.md
2026-02-02 20:58:09 +00:00

1.0 KiB

sidebar_label
sidebar_label
BrowserProvider.getExecutablePath

BrowserProvider.getExecutablePath() method

Get the relative path to the executable within the extracted archive.

Signature

interface BrowserProvider {
  getExecutablePath(options: {
    browser: Browser;
    buildId: string;
    platform: BrowserPlatform;
  }): Promise<string> | string;
}

Parameters

Parameter

Type

Description

options

{ browser: Browser; buildId: string; platform: BrowserPlatform; }

Browser, buildId, and platform

Returns:

Promise<string> | string

Relative path to the executable

Example

// Electron uses simple structure
getExecutablePath() {
  return 'chromedriver/chromedriver';
}

// Custom provider with platform-specific paths
getExecutablePath(options) {
  return `binaries/${options.browser}-${options.platform}`;
}