docs: add playwright test clarification (#6993)

This commit is contained in:
Pavel Feldman 2021-06-09 12:34:58 -07:00 committed by GitHub
parent 19d69b792d
commit 5093e4e804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 3 deletions

View File

@ -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.
<!-- TOC -->

View File

@ -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.