docs(intro-js): reference to create-playwright (#10516)

This commit is contained in:
Max Schmitt 2021-11-24 21:09:33 +01:00 committed by GitHub
parent b8b6c7a220
commit 685892dd62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,23 @@ Playwright Test was created specifically to accommodate the needs of the end-to-
Playwright has its own test runner for end-to-end tests, we call it Playwright Test.
### Using init command
The easiest way to get started with Playwright Test is to run the init command.
```bash
# Run from your project's root directory
npm init playwright
# Or create a new project
npm init playwright new-project
```
This will create a configuration file, optionally add examples, a GitHub Action workflow and a first test `example.spec.ts`. You can now jump directly to [writing assertions](#writing-assertions) section.
### Manually
Add dependency and install browsers.
```bash
npm i -D @playwright/test
# install supported browsers