How to Check Whether Playwright Is Installed on Windows
Check Playwright on Windows with the right CLI command, verify browser binaries separately, and fix common installation errors.
Quick answer: Open PowerShell or Command Prompt in your project directory and run:
npx playwright --version
To verify that an existing local package is installed without allowing npx to download or resolve one, run:
npx --no-install playwright --version
A version number confirms that the Playwright CLI is available in the current project context. It does not prove that Playwright’s Chromium, Firefox or WebKit browser binaries are installed. Check those separately with:
npx playwright install --list
Playwright’s official installation documentation covers the project setup and supported environments at playwright.dev/docs/intro. Browser management is documented at playwright.dev/docs/browsers.
1. Check the Playwright CLI from your project folder
The command should run from the repository or project directory whose package.json contains Playwright. This matters because package managers resolve local binaries from the current project.
PowerShell
cd C:\path\to\your-project
npx --no-install playwright --version
Command Prompt
cd /d C:\path\to\your-project
npx --no-install playwright --version
If the command prints a semantic version such as 1.x.y, the local Playwright CLI can be invoked. The exact version depends on the dependency recorded by the project.
2. Choose the command that matches your package manager
| Project setup | Command | What it checks |
|---|---|---|
| npm or an npm-compatible project | npx --no-install playwright --version |
Uses the local package and refuses to fetch a missing one. |
| npm, allowing npx resolution | npx playwright --version |
Checks whether the CLI is available through npx; npx may resolve a package if one is not local. |
| Yarn | yarn playwright --version |
Runs the project CLI through Yarn. |
| pnpm | pnpm exec playwright --version |
Runs the local binary through pnpm. |
For a strict “is it installed in this repository?” check, prefer the command for the package manager used by the project and avoid a global installation. A globally available command can hide a missing or mismatched project dependency.
3. Confirm the package is recorded in the project
Open package.json and look in devDependencies or dependencies for one of the Playwright packages used by the project. Typical projects use @playwright/test; some use the lower-level playwright package.
type package.json
In PowerShell, you can inspect the relevant entries with:
Get-Content .\package.json
A package entry alone is not a complete installation check. The dependency may be listed but absent from node_modules, or the JavaScript package may be present while its browser downloads are missing.
4. Check whether browser binaries are installed
Playwright installs its JavaScript package and its browser binaries as separate steps. Run:
npx playwright install --list
The output lists browsers known to the current Playwright installation and their executable locations. If a required browser is not listed, install all supported browsers:
npx playwright install
Or install only Chromium:
npx playwright install chromium
You can similarly select firefox or webkit when the test suite requires them.
Where Windows stores browsers
The default Windows browser cache is:
%USERPROFILE%\AppData\Local\ms-playwright
Do not treat a missing folder at that exact path as proof that browsers are absent. Playwright supports overriding the browser path, so the project or machine may use a different location. The authoritative check is npx playwright install --list.
5. Run a practical smoke check
After checking the version and browser list, launch a minimal script. Create check-playwright.js:
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
console.log(await page.title());
await browser.close();
})().catch((error) => {
console.error(error);
process.exitCode = 1;
});
Run it with:
node check-playwright.js
If it prints the page title and exits successfully, the package is importable and the Chromium browser can launch. Remove the temporary file after the check if it is not part of the project.
6. Understand what each result means
| Result | Meaning | Next action |
|---|---|---|
| A version prints | The CLI is reachable in the current package-manager context. | Run install --list to verify browsers. |
--no-install reports a missing package |
Playwright is not installed locally, or you are in the wrong directory. | Change to the project folder or install the dependency. |
| Version works, browser launch fails | The JavaScript package exists but a browser binary or OS dependency is missing. | Run npx playwright install --list, then install the required browser. |
| A browser appears in the list, but tests fail | The test may select another browser, use a custom executable path, or have a project configuration issue. | Check the test’s projects configuration and launch settings. |
7. Install Playwright when it is missing
If the project is new, the official setup wizard can create a Playwright project:
npm init playwright@latest
For an existing Node.js project, install the package selected by the codebase. If tests use the Playwright test runner, that is commonly:
npm install --save-dev @playwright/test
Then download the browsers:
npx playwright install
Commit the resulting package manifest and lockfile changes according to the project’s normal dependency workflow.
8. Troubleshooting Windows installation checks
“playwright is not recognized”
Cause: You ran a bare playwright command, but the local binary directory is not on PATH.
Fix: Run it through the package manager from the project directory:
npx --no-install playwright --version
yarn playwright --version
pnpm exec playwright --version
“npm error canceled” or an unexpected package download
Cause: npx playwright --version can resolve a package when no local binary is available, and network or policy settings can interrupt that resolution.
Fix: Use npx --no-install playwright --version to test only the local installation. If it fails, install the dependency in the project and retry.
“Executable doesn’t exist”
Cause: The package is installed but the requested browser binary has not been downloaded, or the browser cache path changed.
Fix: Inspect the list and install the requested browser:
npx playwright install --list
npx playwright install chromium
The version command works in one folder but not another
Cause: Playwright is a project dependency and package-manager resolution depends on the working directory.
Fix: Change to the repository root containing package.json. Check that dependencies have been installed with the project’s normal package-manager command.
PowerShell execution-policy errors
Cause: A local policy may block PowerShell wrapper scripts.
Fix: Try the same command in Command Prompt, or follow your organization’s approved PowerShell policy process. Do not bypass company policy casually.
Browser download fails behind a proxy or firewall
Cause: Browser archives may be blocked even when npm packages can be downloaded.
Fix: Ask the network administrator for the approved Playwright download configuration, then rerun the install command. Keep the package version and browser version aligned with the lockfile and CI environment.
Tests fail only in CI
Cause: CI may install npm packages without downloading browsers, use a different user profile, or run with a different Node.js and Playwright version.
Fix: Add an explicit browser-install step to the CI setup, run npx playwright install --list in the job, and cache the documented browser directory only when the cache key includes the Playwright version.
9. Windows and project edge cases
- Monorepos: Run the check in the workspace that owns the Playwright dependency. The repository root may not contain the executable.
- Multiple Playwright versions: A root package and a nested package can expose different CLIs. Use the package manager and lockfile for the test project.
- Global installs: A global Playwright command does not prove that the local project is reproducible. Prefer the local binary.
- WSL: A Playwright installation inside WSL has its own Node.js environment and browser cache. Check it from the WSL project context rather than assuming the Windows installation is shared.
- Custom browser paths: Environment settings or launch configuration can point away from
%USERPROFILE%\AppData\Local\ms-playwright. - Node.js versions: Playwright’s supported Node.js versions change. Check the current official installation guide when a new environment is being diagnosed.
10. A repeatable verification checklist
- Open PowerShell or Command Prompt in the project directory.
- Run
npx --no-install playwright --version(or the Yarn/pnpm equivalent). - Confirm the dependency appears in
package.jsonand the lockfile. - Run
npx playwright install --list. - Install the missing browser with
npx playwright install chromiumor the browser required by the project. - Run a small headless smoke script or the project’s normal test command.
- Repeat the same checks in CI if local and CI results differ.
11. Performance, reliability and cost notes
The version check is local and normally completes quickly. Browser installation is the expensive step in time and disk space because it downloads browser binaries. In CI, cache browser downloads carefully and invalidate the cache when the Playwright version changes.
For reliable builds, pin dependencies with the project’s lockfile, install browsers explicitly, and make the browser choice visible in the test configuration. A successful CLI version check alone is not a reliable readiness signal.
Playwright itself is open-source software, but browser downloads consume network bandwidth and CI storage. Your CI provider may charge for those resources even though the package command does not charge a Playwright license fee.
12. Or skip the browser setup
If your goal is simply to obtain a clean screenshot rather than maintain a Windows browser environment, ScreenshotNeo provides a website screenshot API and MCP server. It accepts one GET request and returns PNG, JPEG, WebP or PDF output. See the ScreenshotNeo API documentation for the full option list.
cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Cookie banners, newsletter popups and chat widgets are removed before the shot. Bot checks, blank pages and failed loads are never billed, and response headers identify the page verdict and whether it was billed. An MCP server lets Claude, Cursor and other MCP clients take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Create a free ScreenshotNeo account.
13. FAQ
Does a version number prove that Chromium is installed?
No. Use npx playwright install --list and, if necessary, npx playwright install chromium.
Should I use npx playwright --version or --no-install?
Use --no-install when you need a strict local-dependency check. Use the shorter command when npx resolution is acceptable.
Can I check Playwright from any Windows folder?
Run the command from the project context so the package manager resolves the intended local dependency.
Why does the default browser-cache folder not exist?
The browser path may have been overridden. Ask Playwright with npx playwright install --list instead of relying on the default folder.
Do I need to install every browser?
No. Install the browser engines required by your tests. Chromium is sufficient for projects that only run Chromium tests.


