Skip to main content
Playwright is a framework for Web Testing and Automation that allows testing Chromium, Firefox, and WebKit with a single API. It’s built to enable cross-browser web automation that is ever-green, capable, reliable, and fast.

System requirements

Playwright requires Node.js version 18 or higher.
Playwright supports the following platforms:
  • Linux: Chromium, Firefox, and WebKit
  • macOS: Chromium, Firefox, and WebKit
  • Windows: Chromium, Firefox, and WebKit
Headless execution is supported for all browsers on all platforms.

Installation methods

There are two ways to install Playwright: using the init command (recommended) or 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.
1

Run the init command

From your project’s root directory, run:
npm init playwright@latest
Or create a new project:
npm init playwright@latest new-project
2

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
3

Verify installation

After installation completes, you’ll have:
  • A playwright.config.ts (or .js) configuration file
  • A tests/ directory with example test files
  • Browser binaries installed in your system
  • Optional GitHub Actions workflow in .github/workflows/
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
Playwright uses Chrome for Testing by default, which is a dedicated Chrome build for testing purposes.

Using existing browser channels

Instead of downloading browser binaries, you can use existing browser installations on your system:
import { defineConfig } from '@playwright/test';

export default defineConfig({
  projects: [
    {
      name: 'Google Chrome',
      use: { channel: 'chrome' },
    },
    {
      name: 'Microsoft Edge',
      use: { channel: 'msedge' },
    },
  ],
});

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

If browser installation fails, try:
  • Check your internet connection
  • Run with --force flag: npx playwright install --force
  • Check system dependencies on Linux: npx playwright install-deps
Playwright requires Node.js 18 or higher. Update your Node.js version:
node --version
If below 18, upgrade using nvm or download from nodejs.org
On Linux systems, you may need to install system dependencies for browsers. Run:
npx playwright install-deps

Build docs developers (and LLMs) love