diff --git a/docs/src/browsers.md b/docs/src/browsers.md index cc7ed956fb..ecf5a7246d 100644 --- a/docs/src/browsers.md +++ b/docs/src/browsers.md @@ -29,8 +29,9 @@ other WebKit-based browsers. This gives a lot of lead time to react on the poten ## Google Chrome & Microsoft Edge 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 -support Stable and Beta channels of these browsers. Here is how you can opt into using the stock browser: +Chrome and Microsoft Edge browsers available on the machine (note that Playwright doesn't install them by +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 // @ts-check @@ -95,6 +96,50 @@ var chromium = playwright.Chromium; 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? **Defaults** @@ -334,6 +379,10 @@ $env:PLAYWRIGHT_BROWSERS_PATH=0 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 By default, Playwright downloads browsers from Microsoft CDN.