docs: add warning about browser policy (#22103)

Fixes https://github.com/microsoft/playwright/issues/22016
This commit is contained in:
Yury Semikhatsky 2023-03-30 13:09:57 -07:00 committed by GitHub
parent 98051c7db2
commit ebcb37f61e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -340,6 +340,10 @@ While Playwright can download and use the recent Chromium build, it can operate
Available channels are `chrome`, `msedge`, `chrome-beta`, `msedge-beta` or `msedge-dev`.
:::warning
Certain Enterprise Browser Policies may impact Playwright's ability to launch and control Google Chrome and Microsoft Edge. Running in an environment with browser policies is outside of the Playwright project's scope. See [this page](./troubleshooting.md##incompatible-microsoft-edge--google-chrome-policy-settings) for some known issues.
:::
```js
import { defineConfig, devices } from '@playwright/test';

View file

@ -42,8 +42,9 @@ Running TypeScript tests in `"type": "module"` project requires Node.js 16 or hi
It's known that Playwright is not working as expected when some Microsoft Edge / Google Chrome policy settings are set. The following shows some of them, there might be more that affect Playwright's functionalities. If you find any other policy settings that break functionality, please file an issue and we'll add it to this document. You can see a list of applied policies by running `chrome://policy` in the browser.
- `UserDataDir` - This policy is used to specify the location of the user data directory. Playwright uses a temporary directory for user data, so this policy is not compatible with Playwright. See discussion in [this bug](https://github.com/microsoft/playwright/issues/17448).
- `BrowserSignin` - This policy may prevent Playwright from launching the browser without signing in. Playwright will fail to launch browser if the policy forces users to sign-in to use the browser. See discussion in [this bug](https://github.com/microsoft/playwright/issues/22016)
- `ExtensionInstallForcelist` - This policy is used to specify a list of extensions that should be installed. Playwright's browser close will not work if this policy is set. See discussion in [this bug](https://github.com/microsoft/playwright/issues/17299).
- `UserDataDir` - This policy is used to specify the location of the user data directory. Playwright uses a temporary directory for user data, so this policy is not compatible with Playwright. See discussion in [this bug](https://github.com/microsoft/playwright/issues/17448).
## .NET requirements
* langs: csharp