From 5093e4e80461ab5a152fe7f6ebf7500b8eb00522 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 9 Jun 2021 12:34:58 -0700 Subject: [PATCH] docs: add playwright test clarification (#6993) --- docs/src/browsers.md | 5 +++-- docs/src/test-intro.md | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/src/browsers.md b/docs/src/browsers.md index 455d11ea80..b8dde80167 100644 --- a/docs/src/browsers.md +++ b/docs/src/browsers.md @@ -3,8 +3,9 @@ id: browsers title: "Browsers" --- -Each version of Playwright needs specific versions of browser binaries to operate. By default Playwright downloads Chromium, WebKit and Firefox browser versions that it supports. With every release, Playwright updates the versions -of the browsers it supports, so that the latest Playwright would support the latest browsers at any moment. +Each version of Playwright needs specific versions of browser binaries to operate. Depending on the language you use, Playwright will either download these browsers at package install time for you or will require you to use [Playwright CLI](./cli.md) to install the browsers. Please refer to the [getting started](./intro.md) to see what your platform port does. + +With every release, Playwright updates the versions of the browsers it supports, so that the latest Playwright would support the latest browsers at any moment. It means that every time you update playwright, you might need to re-run the `install` CLI command. diff --git a/docs/src/test-intro.md b/docs/src/test-intro.md index f1a8c4d2cc..98cf7d1590 100644 --- a/docs/src/test-intro.md +++ b/docs/src/test-intro.md @@ -19,12 +19,31 @@ Playwright Test Runner was created specifically to accommodate the needs of the ## Installation -Playwright has its own test runner for end-to-end tests. +Playwright has its own test runner for end-to-end tests, we call it Playwright Test. ```bash npm i -D @playwright/test ``` +:::note +Playwright Test is self-contained, it does not need Playwright to be installed. +If you are an existing Playwright user, make sure that you either uninstall +Playwright or update Playwright before installing Playwright Test: + +``` +npm i -D playwright @playwright/test +``` +::: + + +Unlike Playwright, Playwright Test does not bundle browsers by default, so you need to install them explicitly: + +```bash +npx playwright install +``` + +You can optionally install only selected browsers, see [Playwright CLI](./cli.md) for more details. Or you can install no browsers at all and use existing [browser channels](./browsers.md). + ## First test Create `tests/foo.spec.js` (or `tests/foo.spec.ts` for TypeScript) to define your test.