From 685892dd627297f30fd69e2ffc427db2b19e6ad5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 24 Nov 2021 21:09:33 +0100 Subject: [PATCH] docs(intro-js): reference to create-playwright (#10516) --- docs/src/intro-js.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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