mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: new troubleshooting doc (#15876)
This commit is contained in:
parent
532cf45393
commit
db35842a5a
@ -10,7 +10,7 @@ Playwright can either be used as a part of the [Playwright Test](./intro.md), or
|
||||
|
||||
## Usage
|
||||
|
||||
Use npm or Yarn to install Playwright library in your Node.js project. See [system requirements](#system-requirements).
|
||||
Use npm or Yarn to install Playwright library in your Node.js project. See [system requirements](./troubleshooting.md#system-requirements).
|
||||
|
||||
```bash
|
||||
npm i -D playwright
|
||||
@ -94,29 +94,3 @@ TypeScript support will work out-of-the-box. Types can also be imported explicit
|
||||
```js
|
||||
let page: import('playwright').Page;
|
||||
```
|
||||
|
||||
## System requirements
|
||||
|
||||
Playwright requires Node.js version 14 or above. The browser binaries for Chromium,
|
||||
Firefox and WebKit work across the 3 platforms (Windows, macOS, Linux):
|
||||
|
||||
### Windows
|
||||
|
||||
Works with Windows and Windows Subsystem for Linux (WSL).
|
||||
|
||||
### macOS
|
||||
|
||||
Requires 11 (Big Sur) or above.
|
||||
|
||||
### Linux
|
||||
|
||||
Depending on your Linux distribution, you might need to install additional
|
||||
dependencies to run the browsers.
|
||||
|
||||
:::note
|
||||
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
|
||||
:::
|
||||
|
||||
See also in the [Command line tools](./cli.md#install-system-dependencies)
|
||||
which has a command to install all necessary dependencies automatically for Ubuntu
|
||||
LTS releases.
|
||||
|
||||
@ -177,30 +177,3 @@ On Windows Python 3.7, Playwright sets the default event loop to `ProactorEventL
|
||||
### Threading
|
||||
|
||||
Playwright's API is not thread-safe. If you are using Playwright in a multi-threaded environment, you should create a playwright instance per thread. See [threading issue](https://github.com/microsoft/playwright-python/issues/623) for more details.
|
||||
|
||||
|
||||
## System requirements
|
||||
|
||||
Playwright requires Python 3.7 or above. The browser binaries for Chromium,
|
||||
Firefox and WebKit work across the 3 platforms (Windows, macOS, Linux):
|
||||
|
||||
### Windows
|
||||
|
||||
Works with Windows and Windows Subsystem for Linux (WSL).
|
||||
|
||||
### macOS
|
||||
|
||||
Requires 11 (Big Sur) or above.
|
||||
|
||||
### Linux
|
||||
|
||||
Depending on your Linux distribution, you might need to install additional
|
||||
dependencies to run the browsers.
|
||||
|
||||
:::note
|
||||
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
|
||||
:::
|
||||
|
||||
See also in the [Command line tools](./cli.md#install-system-dependencies)
|
||||
which has a command to install all necessary dependencies automatically for Ubuntu
|
||||
LTS releases.
|
||||
|
||||
@ -3,8 +3,6 @@ id: troubleshooting
|
||||
title: "Troubleshooting"
|
||||
---
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
## Browser dependencies
|
||||
|
||||
Playwright does self-inspection every time it runs to make sure the browsers can be launched successfully. If there are missing
|
||||
@ -15,6 +13,7 @@ which has a command to install all necessary dependencies automatically for Ubun
|
||||
LTS releases.
|
||||
|
||||
## Code transpilation issues
|
||||
* langs: js
|
||||
|
||||
If you are using a JavaScript transpiler like babel or TypeScript, calling `evaluate()` with an async function might not work. This is because while `playwright` uses `Function.prototype.toString()` to serialize functions while transpilers could be changing the output code in such a way it's incompatible with `playwright`.
|
||||
|
||||
@ -27,6 +26,9 @@ await page.evaluate(`(async() => {
|
||||
```
|
||||
|
||||
## Node.js requirements
|
||||
* langs: js
|
||||
|
||||
Playwright requires Node.js version 14 or above
|
||||
|
||||
### ReferenceError: URL is not defined
|
||||
|
||||
@ -36,6 +38,48 @@ Playwright requires Node.js 14 or higher.
|
||||
|
||||
Running TypeScript tests in `"type": "module"` project requires Node.js 16 or higher.
|
||||
|
||||
# Please file an issue
|
||||
## .NET requirements
|
||||
* langs: js
|
||||
|
||||
Playwright is distributed as a **.NET Standard 2.0** library. We recommend .NET 6 or newer.
|
||||
|
||||
## Python requirements
|
||||
* langs: python
|
||||
|
||||
Playwright requires **Python 3.7** or newer.
|
||||
|
||||
## Java requirements
|
||||
* langs: java
|
||||
|
||||
Playwright requires **Java 8** or newer.
|
||||
|
||||
## System requirements
|
||||
|
||||
The browser binaries for Chromium, Firefox and WebKit work across the 3 platforms (Windows, macOS, Linux):
|
||||
|
||||
### Windows
|
||||
|
||||
Works with Windows and Windows Subsystem for Linux (WSL).
|
||||
|
||||
### macOS
|
||||
|
||||
Requires 11 (Big Sur) or above.
|
||||
|
||||
### Linux
|
||||
|
||||
Depending on your Linux distribution, you might need to install additional
|
||||
dependencies to run the browsers.
|
||||
|
||||
:::note
|
||||
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
|
||||
:::
|
||||
|
||||
See also in the [Command line tools](./cli.md#install-system-dependencies)
|
||||
which has a command to install all necessary dependencies automatically for Ubuntu
|
||||
LTS releases.
|
||||
|
||||
|
||||
## Please file an issue
|
||||
|
||||
Playwright is a new project, and we are watching the issues very closely. As we solve common issues, this document will grow to include the common answers.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user