OptionalargsOptionalartifactsIf specified, artifacts (traces, videos, downloads, HAR files, etc.) are saved into this directory. The directory is not cleaned up when the browser closes. If not specified, a temporary directory is used and cleaned up when the browser closes.
OptionalchannelBrowser distribution channel.
Use "chromium" to opt in to new headless mode.
Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or "msedge-canary" to use branded Google Chrome and Microsoft Edge.
OptionalchromiumEnable Chromium sandboxing. Defaults to false.
OptionaldownloadsIf specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.
OptionalenvOptionalexecutablePath to a browser executable to run instead of the bundled one. If
executablePath is
a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
with the bundled Chromium, Firefox or WebKit, use at your own risk.
OptionalfirefoxFirefox user preferences. Learn more about the Firefox user preferences at
about:config.
You can also provide a path to a custom policies.json file via
PLAYWRIGHT_FIREFOX_POLICIES_JSON environment variable.
OptionalhandleClose the browser process on SIGHUP. Defaults to true.
OptionalhandleClose the browser process on Ctrl-C. Defaults to true.
OptionalhandleClose the browser process on SIGTERM. Defaults to true.
OptionalheadlessOptionalignoreIf true, Playwright does not pass its own configurations args and only uses the ones from
args. If an array is given,
then filters out the given default arguments. Dangerous option; use with care. Defaults to false.
OptionalloggerLogger sink for Playwright logging.
OptionalproxyNetwork proxy settings.
Optionalbypass?: stringOptional comma-separated domains to bypass proxy, for example ".com, chromium.org, .domain.com".
Optionalpassword?: stringOptional password to use if HTTP proxy requires authentication.
Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example http://myproxy.com:3128 or
socks5://myproxy.com:3128. Short form myproxy.com:3128 is considered an HTTP proxy.
Optionalusername?: stringOptional username to use if HTTP proxy requires authentication.
OptionalslowSlows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.
OptionaltimeoutMaximum time in milliseconds to wait for the browser instance to start. Defaults to 30000 (30 seconds). Pass 0
to disable timeout.
OptionaltracesIf specified, traces are saved into this directory.
NOTE Use custom browser args at your own risk, as some of them may break Playwright functionality.
Additional arguments to pass to the browser instance. The list of Chromium flags can be found here.