From f61e85291b6ee5a01d0327c19e64f0eae1ed4f8d Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 18 Jun 2020 12:35:37 -0700 Subject: [PATCH] docs: update docs for per-browser download hosts (#2630) --- docs/api.md | 5 ++++- docs/installation.md | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 32652f1c4c..2dbce28d19 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4355,7 +4355,10 @@ WebKit browser instance does not expose WebKit-specific features. Playwright looks for certain [environment variables](https://en.wikipedia.org/wiki/Environment_variable) 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](https://docs.npmjs.com/cli/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 uses `https://storage.googleapis.com` to download Chromium and `https://playwright.azureedge.net` to download Webkit & Firefox. +- `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 uses `https://storage.googleapis.com` to download Chromium and `https://playwright.azureedge.net` to download Webkit & Firefox. You can also use browser-specific download hosts that superceed the `PLAYWRIGHT_DOWNLOAD_HOST` variable: + - `PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST` - host to specify Chromium downloads + - `PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST` - host to specify Firefox downloads + - `PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST` - host to specify Webkit downloads - `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. diff --git a/docs/installation.md b/docs/installation.md index e37a0ea383..d380569dea 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -88,6 +88,14 @@ $ set PLAYWRIGHT_DOWNLOAD_HOST=192.168.1.78 $ npm i -D playwright ``` +It is also possible to use a per-browser download hosts using `PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST`, `PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST` and `PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST` env variables that +take precedence over `PLAYWRIGHT_DOWNLOAD_HOST`. + +```sh +# Linux/macOS +$ PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST=192.168.1.1 PLAYWRIGHT_DOWNLOAD_HOST=192.168.1.78 npm i -D playwright +``` +
## Skip browser downloads