1. What you'll install
- Node.js 18+ — the JavaScript runtime that runs Playwright.
- VS Code — the editor where you'll write tests.
- Playwright — Microsoft's end-to-end testing framework.
2. Step 1 — Install Node.js
- Download the LTS build from nodejs.org.
- Verify in terminal:
node -v
npm -vWhy LTS? It's the version with long-term security patches.
3. Step 2 — Install VS Code
- Download from code.visualstudio.com.
- Install recommended extensions: Playwright Test for VSCode, ESLint, Prettier.
4. Step 3 — Scaffold a Playwright project
Run:
npm init playwright@latest my-first-testAnswer the prompts:
- TypeScript — yes
- Install browsers — yes
- GitHub Actions — no for now
This generates:
my-first-test/
├── package.json
├── playwright.config.ts
├── tests/
└── .gitignore5. Step 4 — Open the project in VS Code
code my-first-testConfirm the Playwright extension shows the test explorer icon in the sidebar.
6. Step 5 — Sanity check
npx playwright test --headedThe default example test should open a browser, navigate to playwright.dev, and pass.
7. Hands-on task (terminal)
- Run every command in this lesson in your own terminal.
- Paste the final
1 passedoutput into the lab submission box.
8. What's next
Continue to Module 01 / Lab 3: Run your first test.
Up next in the learning path
Run your first test