From 18add6b26d869ee4b69e78d1d886d684f9b6e4fb Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 30 Apr 2021 15:03:23 +0200 Subject: [PATCH] docs(cli): add install-deps command and reference to it --- docs/src/cli.md | 19 +++++++++++++++++++ docs/src/intro-csharp.md | 27 ++++++++++++++++++++------- docs/src/intro-java.md | 27 ++++++++++++++++++++------- docs/src/intro-js.md | 27 ++++++++++++++++++++------- docs/src/intro-python.md | 29 +++++++++++++++++++++-------- docs/src/troubleshooting.md | 4 +++- 6 files changed, 103 insertions(+), 30 deletions(-) diff --git a/docs/src/cli.md b/docs/src/cli.md index f061363528a22..4f4bff9f71f51 100644 --- a/docs/src/cli.md +++ b/docs/src/cli.md @@ -369,5 +369,24 @@ $ mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="pd $ playwright pdf https://en.wikipedia.org/wiki/PDF wiki.pdf ``` +## Install system dependencies + +Ubuntu 18.04 and Ubuntu 20.04 system dependencies can get installed automatically. This is useful for CI environments. + +```sh js +# See command help +$ npx playwright install-deps +``` + +```sh java +# See command help +$ mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install-deps" +``` + +```sh python +# See command help +$ playwright install-deps +``` + ## Known limitations Opening WebKit Web Inspector will disconnect Playwright from the browser. In such cases, code generation will stop. diff --git a/docs/src/intro-csharp.md b/docs/src/intro-csharp.md index dc536a2c7eac6..8746c6a0b9791 100644 --- a/docs/src/intro-csharp.md +++ b/docs/src/intro-csharp.md @@ -50,10 +50,23 @@ Command Line Interface [CLI](./cli.md) can be used to record user interactions a 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 10.14 or above. -* **Linux**: Depending on your Linux distribution, you might need to install additional - dependencies to run the browsers. - * Firefox requires Ubuntu 18.04+ - * For Ubuntu 20.04, the additional dependencies are defined in [our Docker image](https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.focal), - which is based on Ubuntu. +### Windows + +Works with Windows and Windows Subsystem for Linux (WSL). + +### macOS + +Requires 10.14 (Mojave) or above. + +### Linux + +Depending on your Linux distribution, you might need to install additional +dependencies to run the browsers. + +:::note +Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported. +::: + +See also in the [Command Line Interface](./cli.md#install-system-dependencies) +which has a command to install all necessary dependencies automatically for Ubuntu +LTS releases. diff --git a/docs/src/intro-java.md b/docs/src/intro-java.md index 20a3b6f62ee8c..9465b90e51559 100644 --- a/docs/src/intro-java.md +++ b/docs/src/intro-java.md @@ -128,10 +128,23 @@ $ mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="co Playwright requires **Java 8** or newer. 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 10.14 or above. -* **Linux**: Depending on your Linux distribution, you might need to install additional - dependencies to run the browsers. - * Firefox requires Ubuntu 18.04+ - * For Ubuntu 20.04, the additional dependencies are defined in [our Docker image](https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.focal), - which is based on Ubuntu. +### Windows + +Works with Windows and Windows Subsystem for Linux (WSL). + +### macOS + +Requires 10.14 (Mojave) or above. + +### Linux + +Depending on your Linux distribution, you might need to install additional +dependencies to run the browsers. + +:::note +Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported. +::: + +See also in the [Command Line Interface](./cli.md#install-system-dependencies) +which has a command to install all necessary dependencies automatically for Ubuntu +LTS releases. diff --git a/docs/src/intro-js.md b/docs/src/intro-js.md index 33d8d0cb4954f..07ccbd3be1f2a 100644 --- a/docs/src/intro-js.md +++ b/docs/src/intro-js.md @@ -100,10 +100,23 @@ let page: import('playwright').Page; Playwright requires Node.js version 10.17 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 10.14 or above. -* **Linux**: Depending on your Linux distribution, you might need to install additional - dependencies to run the browsers. - * Firefox requires Ubuntu 18.04+ - * For Ubuntu 20.04, the additional dependencies are defined in [our Docker image](https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.focal), - which is based on Ubuntu. +### Windows + +Works with Windows and Windows Subsystem for Linux (WSL). + +### macOS + +Requires 10.14 (Mojave) or above. + +### Linux + +Depending on your Linux distribution, you might need to install additional +dependencies to run the browsers. + +:::note +Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported. +::: + +See also in the [Command Line Interface](./cli.md#install-system-dependencies) +which has a command to install all necessary dependencies automatically for Ubuntu +LTS releases. diff --git a/docs/src/intro-python.md b/docs/src/intro-python.md index fa55706bfea6c..11fb3a9f072ba 100644 --- a/docs/src/intro-python.md +++ b/docs/src/intro-python.md @@ -80,13 +80,26 @@ $ playwright codegen wikipedia.org ## System requirements -Playwright requires Python version 3.7 or above. The browser binaries for Chromium, +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 10.14 or above. -* **Linux**: Depending on your Linux distribution, you might need to install additional - dependencies to run the browsers. - * Firefox requires Ubuntu 18.04+ - * For Ubuntu 20.04, the additional dependencies are defined in [our Docker image](https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.focal), - which is based on Ubuntu. +### Windows + +Works with Windows and Windows Subsystem for Linux (WSL). + +### macOS + +Requires 10.14 (Mojave) or above. + +### Linux + +Depending on your Linux distribution, you might need to install additional +dependencies to run the browsers. + +:::note +Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported. +::: + +See also in the [Command Line Interface](./cli.md#install-system-dependencies) +which has a command to install all necessary dependencies automatically for Ubuntu +LTS releases. diff --git a/docs/src/troubleshooting.md b/docs/src/troubleshooting.md index 0a6360bedc13d..5574834c6bb08 100644 --- a/docs/src/troubleshooting.md +++ b/docs/src/troubleshooting.md @@ -10,7 +10,9 @@ title: "Troubleshooting" Playwright does self-inspection every time it runs to make sure the browsers can be launched successfully. If there are missing dependencies, playwright will print instructions to acquire them. -We also provide [Ubuntu 18.04 dockerfile](https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.bionic) and [Ubuntu 20.04 dockerfile](https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.focal) with the list of Debian dependencies. +See also in the [Command Line Interface](./cli.md#install-system-dependencies) +which has a command to install all necessary dependencies automatically for Ubuntu +LTS releases. ## Code transpilation issues