diff --git a/docs/src/intro-js.md b/docs/src/intro-js.md index 726c0bcc9f..ec43bff03b 100644 --- a/docs/src/intro-js.md +++ b/docs/src/intro-js.md @@ -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