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

Fixes #24607.
This commit is contained in:
Dmitry Gozman 2023-08-22 13:22:38 -07:00 committed by GitHub
parent afc5ebe075
commit bb808ca964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 15 deletions

View file

@ -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
```

View file

@ -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.