Setup
Install Playwright
Install Playwright with npm, browser binaries, generated starter files, and verification commands for a working local setup.
Prerequisites
- Node.js installed.
- A project folder.
- Terminal access.
- Basic JavaScript or TypeScript familiarity.
Installation Command
npm init playwright@latestWhat Gets Installed
- Playwright Test runner.
- Browser automation package.
- Example tests.
- playwright.config file.
- Browser binaries when selected or installed separately.
Verify Setup
npx playwright test
npx playwright show-reportCommon Setup Errors
- Node version is too old.
- Browsers were not installed.
- Command is run outside the project folder.
- Corporate proxy blocks browser download.