System requirements
Playwright requires Node.js version 18 or higher.
- Linux: Chromium, Firefox, and WebKit
- macOS: Chromium, Firefox, and WebKit
- Windows: Chromium, Firefox, and WebKit
Installation methods
There are two ways to install Playwright: using the init command (recommended) or manual installation.- Using init command
- Manual installation
The easiest way to get started with Playwright Test is to run the init command. This is the recommended approach for new projects.
Configure your setup
The init command will prompt you to:
- Choose which browsers to install (Chromium, Firefox, WebKit)
- Set up TypeScript or JavaScript
- Add example tests
- Configure GitHub Actions workflow
This method automatically creates a configuration file, adds example tests, and sets up GitHub Actions workflow for CI/CD.
Browser versions
Playwright uses the following browser versions:- Chromium: 146.0.7680.31 (Chrome for Testing)
- Firefox: 146.0.1
- WebKit: 26.0
Using existing browser channels
Instead of downloading browser binaries, you can use existing browser installations on your system:Package information
The main Playwright package includes:- playwright: Full Playwright library with browser automation and test runner
- playwright-core: Core library without browser binaries (version 1.59.0-next)
- @playwright/test: Test runner for end-to-end tests
Next steps
Quick start
Run your first Playwright test
Writing tests
Learn how to write effective tests
Troubleshooting
Browser installation fails
Browser installation fails
If browser installation fails, try:
- Check your internet connection
- Run with
--forceflag:npx playwright install --force - Check system dependencies on Linux:
npx playwright install-deps
Node version error
Node version error
Playwright requires Node.js 18 or higher. Update your Node.js version:If below 18, upgrade using nvm or download from nodejs.org
