Browsers
Playwright bundles its own browser builds — they're separate from anything you have installed. After every Playwright version bump I always run 'npx playwright install' again, otherwise tests run with mismatched binaries. The flag I use most often: '--with-deps' for CI runners that need OS-level libraries too.
Introduction
Each version of Playwright expects matching browser builds. Install them with the Playwright CLI (npx playwright install) so local runs and CI use the same binaries as your test package.
After upgrading @playwright/test, run npx playwright install again so browsers stay in sync.
Install browsers
Install the default browser bundle (Chromium, Firefox, WebKit) for your project:
Install only one engine when you do not need the full set:
List supported browser names and installer flags:
Install system dependencies
On Linux CI runners, install OS packages Playwright needs (fonts, libraries). This is what '--with-deps' does — it's the shortcut I use on fresh agents:
Install dependencies for a single browser only:
Install browsers and system dependencies in one step — what I always use on CI:
Keep Playwright and browsers in sync
Bump the test runner, then reinstall browsers so versions match:
Print the CLI version you are on:
Configure browsers
Playwright Test targets Chromium, WebKit, Firefox, emulated mobile profiles, and branded Chrome/Edge through projects in playwright.config. Device presets live in Playwright's device registry.
Example: multiple projects
Define one project per browser or device. Each entry sets use (and optional channel for branded builds):
Run every project (all browsers) from the CLI:
Run a single project by name:
Chromium
For Chrome, Edge, and other Chromium-based browsers Playwright defaults to open-source Chromium builds. Chromium tip often tracks ahead of stable branded channels.
Chromium: headless shell
Headless runs can use the dedicated headless shell. On CI, if you only need that shell, save download time:
Chromium: new headless (channel)
Opt into the newer headless stack with the chromium channel in config:
If you rely on that mode, skip downloading the legacy headless shell during install:
Google Chrome and Microsoft Edge
Playwright can drive locally installed Chrome or Edge (chrome, msedge, beta/dev/canary channels). It does not install them automatically — use npx playwright install msedge (or chrome) when you need the installer to fetch a branded build.
Point projects at branded channels when policy requires testing the same binaries users run:
Firefox
Playwright bundles a recent Firefox stable build patched for automation. Stock Firefox installs are not used directly.
WebKit
Playwright's WebKit tracks upstream WebKit; it may differ slightly from consumer Safari builds. Use it for cross-engine coverage on macOS or Linux CI.
Install behind a firewall or a proxy
Playwright downloads browsers from Microsoft's CDN by default. Behind a corporate proxy, set HTTPS_PROXY before npx playwright install.
Custom CA for TLS interception — point Node at your root bundle before installing:
Slow link to the CDN? Increase the download connection timeout (milliseconds):
When running install-deps with sudo on Linux, export proxy variables in the same root shell so apt sees them.
Managing browser binaries
Caches live under %USERPROFILE%\AppData\Local\ms-playwright (Windows), ~/Library/Caches/ms-playwright (macOS), or ~/.cache/ms-playwright (Linux). Check disk usage:
Share a single download directory across workspaces with PLAYWRIGHT_BROWSERS_PATH:
Point test runs at the same path:
Hermetic install
Keep binaries inside node_modules for reproducible CI caches:
Skip browser downloads
If browsers are provisioned elsewhere, skip the download step during installs: