PW Playwright · TSFree course: Playwright with TypeScript
Full course

Chapter 2 · Lesson 2

Creating the project

Difficulty: Easy
Slides
Use the arrow keys, N for notes, F for full screenOpen in a separate window ↗
Video lesson

Key points

  1. Create an empty folder (for example my-first-playwright) and open it in VS Code.
  2. 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:

QuestionAnswer
TypeScript or JavaScriptTypeScript
Where to put the teststests (default)
Add GitHub ActionsNo (we will get to this later in your learning path)
Install the browsersYes

The exact wording can change a little between versions. If the wizard asks anything else, the default is almost always right.