Back to Puppeteer

install() function

docs/browsers-api/browsers.install.md

19.2.21.4 KB
Original Source

install() function

<h2 id="overload-1">install(): Promise&lt;InstalledBrowser&gt;</h2>

Downloads and unpacks the browser archive according to the InstallOptions.

Signature

typescript
export declare function install(
  options: InstallOptions & {
    unpack?: true;
  },
): Promise<InstalledBrowser>;

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

options

</td><td>

InstallOptions & { unpack?: true; }

</td><td> </td></tr> </tbody></table>

Returns:

Promise<InstalledBrowser>

a InstalledBrowser instance.

<h2 id="overload-2">install(): Promise&lt;string&gt;</h2>

Downloads the browser archive according to the InstallOptions without unpacking.

Signature

typescript
export declare function install(
  options: InstallOptions & {
    unpack: false;
  },
): Promise<string>;

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

options

</td><td>

InstallOptions & { unpack: false; }

</td><td> </td></tr> </tbody></table>

Returns:

Promise<string>

the absolute path to the archive.