Files
puppeteer/docs/api/puppeteer.configuration.md

2.9 KiB

sidebar_label
sidebar_label
Configuration

Configuration interface

Defines options to configure Puppeteer's behavior during installation and runtime.

See individual properties for more information.

Signature

export interface Configuration

Properties

Property

Modifiers

Type

Description

Default

"chrome-headless-shell"

optional

ChromeHeadlessShellSettings

cacheDirectory

optional

string

Defines the directory to be used by Puppeteer for caching.

Can be overridden by PUPPETEER_CACHE_DIR.

path.join(os.homedir(), '.cache', 'puppeteer')

chrome

optional

ChromeSettings

defaultBrowser

optional

SupportedBrowser

Specifies which browser you'd like Puppeteer to use.

Can be overridden by PUPPETEER_BROWSER.

chrome

executablePath

optional

string

Specifies an executable path to be used in puppeteer.launch.

Can be overridden by PUPPETEER_EXECUTABLE_PATH.

Auto-computed.

experiments

optional

ExperimentsConfiguration

Defines experimental options for Puppeteer.

firefox

optional

FirefoxSettings

logLevel

optional

'silent' | 'error' | 'warn'

Tells Puppeteer to log at the given level.

warn

skipDownload

optional

boolean

Tells Puppeteer to not download any of the browsers during installation.

Can be overridden by PUPPETEER_SKIP_DOWNLOAD or by specifying either skipDownload property in each browser specific config or by providing PUPPETEER_FIREFOX_SKIP_DOWNLOAD and PUPPETEER_CHROME_SKIP_DOWNLOAD.

temporaryDirectory

optional

string

Defines the directory to be used by Puppeteer for creating temporary files.

Can be overridden by PUPPETEER_TMP_DIR.

os.tmpdir()