Key points
- Create an empty folder (for example
my-first-playwright) and open it in VS Code. - Open a terminal inside VS Code (menu Terminal → New Terminal) and run:
npm init playwright@latest
The wizard asks a few questions. The recommended answers:
| Question | Answer |
|---|---|
| TypeScript or JavaScript | TypeScript |
| Where to put the tests | tests (default) |
| Add GitHub Actions | No (we will get to this later in your learning path) |
| Install the browsers | Yes |
The exact wording can change a little between versions. If the wizard asks anything else, the default is almost always right.