docs: add instructions on msedge & chrome installation (#19753)
Fixes #18511
This commit is contained in:
Родитель
b8f96a9411
Коммит
d912cbf115
|
@ -29,8 +29,9 @@ other WebKit-based browsers. This gives a lot of lead time to react on the poten
|
||||||
## Google Chrome & Microsoft Edge
|
## Google Chrome & Microsoft Edge
|
||||||
|
|
||||||
While Playwright can download and use the recent Chromium build, it can operate against the stock Google
|
While Playwright can download and use the recent Chromium build, it can operate against the stock Google
|
||||||
Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will
|
Chrome and Microsoft Edge browsers available on the machine (note that Playwright doesn't install them by
|
||||||
support Stable and Beta channels of these browsers. Here is how you can opt into using the stock browser:
|
default). In particular, current Playwright version will support Stable and Beta channels of these browsers.
|
||||||
|
Here is how you can opt into using the stock browser:
|
||||||
|
|
||||||
```js tab=js-js
|
```js tab=js-js
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
@ -95,6 +96,50 @@ var chromium = playwright.Chromium;
|
||||||
var browser = await chromium.LaunchAsync(new BrowserTypeLaunchOptions { Channel = "chrome" });
|
var browser = await chromium.LaunchAsync(new BrowserTypeLaunchOptions { Channel = "chrome" });
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Installing Google Chrome & Microsoft Edge
|
||||||
|
|
||||||
|
If stock Google Chrome or Microsoft Edge is not available on your machine, you can install
|
||||||
|
them using Playwright command line tool:
|
||||||
|
|
||||||
|
```bash lang=js
|
||||||
|
npx playwright install msedge
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell lang=js
|
||||||
|
npx playwright install msedge
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash lang=python
|
||||||
|
playwright install msedge
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell lang=python
|
||||||
|
playwright install msedge
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash lang=csharp
|
||||||
|
pwsh bin/Debug/netX/playwright.ps1 install msedge
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell lang=csharp
|
||||||
|
pwsh bin/Debug/netX/playwright.ps1 install msedge
|
||||||
|
```
|
||||||
|
|
||||||
|
```batch lang=java
|
||||||
|
mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install msedge"
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell lang=java
|
||||||
|
mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install msedge"
|
||||||
|
```
|
||||||
|
|
||||||
|
Run with `--help` option to see full list of the browsers that can be installed this way.
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
Google Chrome or Microsoft Edge installations will not be isolated. They will be installed at the
|
||||||
|
default global location that depends on your operating system.
|
||||||
|
:::
|
||||||
|
|
||||||
### When to use Google Chrome & Microsoft Edge and when not to?
|
### When to use Google Chrome & Microsoft Edge and when not to?
|
||||||
|
|
||||||
**Defaults**
|
**Defaults**
|
||||||
|
@ -334,6 +379,10 @@ $env:PLAYWRIGHT_BROWSERS_PATH=0
|
||||||
npx playwright install
|
npx playwright install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::note
|
||||||
|
`PLAYWRIGHT_BROWSERS_PATH` does not change installation path for Google Chrome and Microsoft Edge.
|
||||||
|
:::
|
||||||
|
|
||||||
## Install behind a firewall or a proxy
|
## Install behind a firewall or a proxy
|
||||||
|
|
||||||
By default, Playwright downloads browsers from Microsoft CDN.
|
By default, Playwright downloads browsers from Microsoft CDN.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче