Skip to main content
Version: Next

LaunchOptions interface

Signature

export interface LaunchOptions

Properties

Property

Modifiers

Type

Description

Default

args

optional

string[]

Additional arguments to pass to the executable when launching.

detached

optional

boolean

Whether to spawn process in the detached mode.

true except on Windows.

dumpio

optional

boolean

If true, forwards the browser's process stdout and stderr to the Node's process stdout and stderr.

false.

env

optional

Record<string, string | undefined>

Environment variables to set for the browser process.

executablePath

string

Absolute path to the browser's executable.

handleSIGHUP

optional

boolean

Handles SIGHUP in the Node process and tries to gracefully close the browser process.

true.

handleSIGINT

optional

boolean

Handles SIGINT in the Node process and tries to kill the browser process.

true.

handleSIGTERM

optional

boolean

Handles SIGTERM in the Node process and tries to gracefully close the browser process.

true.

onExit

optional

() => Promise<void>

A callback to run after the browser process exits or before the process will be closed via the Process.close() call (including when handling signals). The callback is only run once.

pipe

optional

boolean

Configures stdio streams to open two additional streams for automation over those streams instead of WebSocket.

false.