Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: move PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD section to library-js (#26617)

Dmitry Gozmanbb808ca964e5
diff --git a/docs/src/browsers.md b/docs/src/browsers.md
index 65fac17328..bf83ad8af3 100644
--- a/docs/src/browsers.md
+++ b/docs/src/browsers.md
@@ -951,27 +951,13 @@ npx playwright install
:::
### Skip browser downloads
-* langs: js, java
+* langs: java
In certain cases, it is desired to avoid browser downloads altogether because
browser binaries are managed separately.
This can be done by setting `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` variable before installation.
-```bash tab=bash-bash lang=js
-PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install
-```
-
-```batch tab=bash-batch lang=js
-set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
-npx playwright install
-```
-
-```powershell tab=bash-powershell lang=js
-$Env:PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
-npx playwright install
-```
-
```bash tab=bash-bash lang=java
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 mvn test
```
diff --git a/docs/src/library-js.md b/docs/src/library-js.md
index c317929f99..d85c28c1ac 100644
--- a/docs/src/library-js.md
+++ b/docs/src/library-js.md
@@ -177,6 +177,27 @@ firefox.launch({ headless: false, slowMo: 50 });
npx playwright codegen wikipedia.org
```
+## Browser downloads
+
+By default, `playwright` automatically downloads Chromium, Firefox and WebKit during package installation.
+
+In certain cases, it is desired to avoid browser downloads altogether because browser binaries are managed separately. This can be done by setting `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` variable before installing packages.
+
+```bash tab=bash-bash lang=js
+PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install
+```
+
+```batch tab=bash-batch lang=js
+set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
+npm install
+```
+
+```powershell tab=bash-powershell lang=js
+$Env:PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
+npm install
+```
+
+
## TypeScript support
Playwright includes built-in support for TypeScript. Type definitions will be imported automatically. It is recommended to use type-checking to improve the IDE experience.