Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
.NET

How to Run Playwright on Windows: Install, Set Up Browsers, and Run Tests

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fastest path: install Node.js, scaffold a Playwright project with npm init playwright@latest, download the version-matched browsers with npx playwright install, and run the tests with npx playwright test. Playwright’s package and its Chromium, Firefox, and WebKit binaries are separate installations, so installing only the npm package is not enough.

This guide covers a first Windows run, headed debugging, Python and .NET alternatives, browser channels, CI, common failures, and a browser-free screenshot option.

What you need before installing

  • A supported Windows installation and a project directory where you can create files.
  • Node.js for the Node.js examples, Python for Python, or the .NET SDK for .NET.
  • Permission to install packages and download browser binaries in your user or project environment.
  • An internet connection for the initial package and browser downloads.

Support changes with each Playwright release. Check the current language-specific documentation before pinning a runtime version. The official Node.js introduction is at playwright.dev/docs/intro.

Run Playwright with Node.js (the usual Windows setup)

1. Install Node.js and create a project

Install Node.js using the method your team already uses, then open PowerShell or Windows Terminal. Create a directory and move into it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
mkdir playwright-windows
cd playwright-windows

You can also use an existing JavaScript or TypeScript project. The commands below use npm, which is installed with Node.js.

2. Scaffold Playwright Test

For a new project, run:

npm init playwright@latest

The interactive setup creates a Playwright Test configuration, an example test, and a test directory. Accepting the defaults is a sensible first run; you can choose JavaScript or TypeScript and change the test directory when prompted.

In an existing project, install the test runner as a development dependency instead:

npm install --save-dev @playwright/test

3. Download browser binaries

Install the browser revisions that match the Playwright version in this project:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npx playwright install

This downloads Playwright-managed builds of Chromium, Firefox, and WebKit. The Windows browser cache is normally %USERPROFILE%AppDataLocalms-playwright. Each Playwright release expects particular browser revisions; after upgrading Playwright, run the install command again if the release requests new binaries. Details, including browser channels, are maintained at playwright.dev/docs/browsers.

You can install only selected engines when you do not need all three:

npx playwright install chromium
npx playwright install firefox
npx playwright install webkit

4. Write or inspect a test

Put tests in the generated tests directory (or the directory configured in playwright.config). A minimal test looks like this:

Rank #2
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
  • 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
  • 4GB DDR4 System Memory; 128GB Solid State Drive
  • 11.6" HD (1366 x 768) Multi-Touch Display
  • Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
  • Windows 11 Pro
import { test, expect } from '@playwright/test';

test('home page has the expected title', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page).toHaveTitle(/Example Domain/);
});

Use your real URL and assertions. Playwright waits for its web assertions and actions according to the configured timeouts, so prefer locators and expect assertions over fixed sleeps.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Run the suite

npx playwright test

Playwright runs headlessly by default. To watch the browser:

npx playwright test --headed

To run one file, pass its path (for example, npx playwright test tests/example.spec.ts). CLI flags can evolve, so use npx playwright test --help with the installed release for the complete current list.

Choose a browser engine or branded browser

Target Use it when Windows command or setting
Chromium You need the Playwright-managed Chromium build and predictable version matching. npx playwright install chromium
Firefox You are validating Firefox-specific behavior. npx playwright install firefox
WebKit You need WebKit coverage, commonly for Safari-like behavior. npx playwright install webkit
Google Chrome channel The test must exercise branded Chrome rather than bundled Chromium. Configure a Chrome channel in the project; consult the browser documentation.
Microsoft Edge channel The test must exercise branded Edge. Configure an Edge channel in the project; consult the browser documentation.

Bundled browsers are generally the more reproducible choice. Playwright warns that installing Chrome or Edge through its installer places the browser in the operating system’s default global location and can replace the current installation. Do not use that option casually on a workstation that depends on a separately managed browser.

Useful Windows workflows after the first run

See a failure in a real browser window

Use --headed first. If you need deeper diagnosis, use Playwright’s current tracing and debugging tools for the release installed in your project; the generated configuration and npx playwright test --help show the available commands and flags.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run a single test while editing

Pass the test file path to avoid waiting for the entire suite. Keep the test’s URL, credentials, and other environment-specific values in configuration or environment variables rather than committing secrets.

Keep browser downloads predictable

Do not copy a browser cache from an unrelated Playwright version and assume it is compatible. Re-run npx playwright install after dependency updates, and check the cache path when a machine reports that an executable is missing.

Rank #3
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Capture pages, PDFs, and controlled screenshots

Playwright itself can automate a page, but a production screenshot service can remove browser infrastructure from an application. ScreenshotNeo is a website screenshot API and MCP server for developers: ScreenshotNeo accepts one GET request and returns PNG, JPEG, WebP, or PDF.

Python on Windows

Install the Python package in the environment used by your project:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
pip install playwright
playwright install

Use Playwright’s Python APIs directly, or add the pytest integration used by your test project and run:

pytest

The Python introduction specifically lists Windows 11+, Windows Server 2019+, and Windows Subsystem for Linux among its system options; do not assume that list applies unchanged to every language binding. See the Python introduction and the Python browser guide.

Python has the same two-stage browser model as Node.js: pip install playwright installs the library, while playwright install downloads browser binaries. Run the latter again after a Playwright upgrade when required.

.NET on Windows

Create a test project with a supported framework such as MSTest, NUnit, or xUnit, add the Playwright package, and build it. The generated PowerShell installer then downloads the matching browsers. A CI-style sequence is:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dotnet build
pwsh bin/Debug/netX/playwright.ps1 install --with-deps
dotnet test

Replace netX and the configuration path with the target framework and build output produced by your project. The script location is project-specific. Windows CI does not generally need Linux-style dependency setup; the official .NET guidance is at the .NET browser guide and the .NET CI guide.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Run Playwright in Windows CI

The official CI guidance says Windows and macOS agents need no additional Playwright configuration: install the project packages, install the browsers, and run the tests. A generic Node.js job follows the same order as a local run:

  1. Check out the repository.
  2. Install dependencies with the repository’s package-manager command.
  3. Run npx playwright install (or install only the engines used by the suite).
  4. Run npx playwright test.

For CI stability and reproducibility, Playwright recommends one worker. Powerful self-hosted agents can run tests in parallel, and larger suites can be sharded across jobs when the reporting and resource costs are understood. Read the current Windows guidance at playwright.dev/docs/ci.

Troubleshooting Windows installations

“Executable doesn’t exist” or browser missing

Cause: the package is installed but its browser revision is not. Fix: run npx playwright install from the same project environment, then retry. Check %USERPROFILE%AppDataLocalms-playwright if you need to confirm that the cache exists.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Browser revision mismatch after an update

Cause: Playwright was upgraded without downloading its new browser revision. Fix: run the install command again and commit the dependency lockfile so other machines resolve the same package version.

PowerShell says a command is not recognized

Cause: Node.js, Python, or the .NET SDK is not on PATH, or the terminal was opened before installation. Fix: open a new terminal, verify the runtime command (node --version, python --version, or dotnet --version), and reinstall or correct PATH only if that command still fails.

Headless passes but headed mode fails

Cause: the visible run exposes timing, viewport, display, or environment differences. Fix: reproduce with --headed, inspect the failing locator and waits, and use tracing/debugging tools from the installed Playwright release rather than adding arbitrary sleeps.

Downloads fail on a corporate network

Cause: a proxy, firewall, or certificate policy blocks the browser download. Fix: follow your organization’s approved proxy and certificate procedure, then rerun the browser install. Do not silently substitute an unrelated browser binary: Playwright expects the revision associated with the package.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.

Tests are flaky in CI

Cause: shared resources, parallel workers, unstable test data, or an assertion that races the page. Fix: start with one worker, use resilient locators and web assertions, isolate test data, and shard only after a single-worker run is reliable.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For a one-off or server-side screenshot, ScreenshotNeo avoids installing and maintaining Playwright on your Windows machine. Before capture it accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.

Its API supports full-page screenshots with lazy images, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper sizes and page ranges, custom CSS and JavaScript, clicks before capture, selector or network-idle waits, request/resource blocking, headers, cookies, user agents, Authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, and an OpenAPI specification. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools to Claude, Cursor, and other MCP clients.

See the complete parameter reference in the ScreenshotNeo documentation. The following calls use the same target URL and can be run without a local browser:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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}`);

The Free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 shots; yearly billing provides two months free. Create a free ScreenshotNeo account to get the 1,000 monthly screenshots without installing browser binaries.

Playwright versus a screenshot API: which route fits?

Need Best fit Why
End-to-end tests, clicks, forms, assertions, and network control Playwright on Windows You own the test code, browser version, fixtures, and CI execution.
Repeatable screenshots or PDFs from an application ScreenshotNeo A single API request handles browser execution and returns the asset.
AI agent access to page information and captures ScreenshotNeo MCP server Use dedicated MCP tools from an MCP-compatible client.
Offline or highly customized local browser debugging Playwright Headed mode and local tracing keep the browser session on your machine.

Frequently Asked Questions

Does Playwright install Chrome automatically?

It installs Playwright-managed Chromium, Firefox, and WebKit builds by default. Branded Chrome and Edge are optional channels and should be used only when testing those products specifically.

Where are Playwright browsers stored on Windows?

The documented default cache is %USERPROFILE%AppDataLocalms-playwright.

Can I run Playwright without a test runner?

Yes. The language libraries can launch browsers and automate pages directly; the Node.js commands in this guide use Playwright Test because it supplies project scaffolding, fixtures, discovery, and reporting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does a Playwright update require another browser download?

Playwright versions are tied to specific browser revisions. Updating the package can therefore require rerunning the corresponding browser installation command.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$249.99
Bestseller No. 2
Dell Latitude 3190 11.6' HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core; 4GB DDR4 System Memory; 128GB Solid State Drive
Bestseller No. 3
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$304.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.