Create New Project in Playwright

From the Playwright cheat sheet · Installation & Setup · verified Jul 2026

Create New Project

Initialize a new Playwright test project with all dependencies

bash
# Create new project
npm init playwright@latest

# Install in existing project
npm install -D @playwright/test

# Install browsers
npx playwright install
💡 The init command scaffolds config, example tests, and GitHub Actions workflow
⚡ Use --with-deps on CI to install system-level browser dependencies automatically
📌 Playwright bundles its own browsers — no need for separate Chrome/Firefox installs
🟢 Supports Chromium, Firefox, and WebKit out of the box
installsetup

More Playwright tasks

Back to the full Playwright cheat sheet