Setup
Run Playwright Tests
Run Playwright tests in headless, headed, UI, debug, browser-specific, and report modes.
Basic Run Commands
npx playwright test
npx playwright test tests/login.spec.tsHeaded, UI, and Debug Modes
npx playwright test --headed
npx playwright test --ui
npx playwright test --debugProject and Browser Runs
npx playwright test --project=chromium
npx playwright test --project=firefoxReports and Artifacts
npx playwright show-reportCommon Run Errors
- Test file path is wrong.
- Browser dependencies are missing.
- Base URL is not configured.
- A previous app server is not running.
- The test depends on data that does not exist.