Environment Variables
NOTE playwright-core does not respect environment variables.
Playwright looks for certain environment variables to aid its operations. If Playwright doesn’t find them in the environment, a lowercased variant of these variables will be used from the npm config.
PLAYWRIGHT_DOWNLOAD_HOST
- overwrite URL prefix that is used to download browsers. Note: this includes protocol and might even include path prefix. By default, Playwright useshttps://storage.googleapis.com
to download Chromium andhttps://playwright.azureedge.net
to download Webkit & Firefox.PLAYWRIGHT_BROWSERS_PATH
- specify a shared folder that playwright will use to download browsers and to look for browsers when launching browser instances.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
- set to non-empty value to skip browser downloads altogether.
# Install browsers to the shared location.
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/playwright-browsers npm install --save-dev playwright
# Use shared location to find browsers.
$ PLAYWRIGHT_BROWSERS_PATH=$HOME/playwright-browsers node playwright-script.js