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

The shortest supported Windows setup for Playwright Test is to install Node.js, initialize a project with npm init playwright@latest, and run npx playwright test. The initializer creates a configuration file, package metadata, a starter test, and (unless you decline) the required browser binaries. This guide uses the Node.js workflow first, then shows the separate Python, .NET, and Java paths.

Check the Windows and Node.js prerequisites

Supported Windows environments

Playwright’s official requirements list Windows 11 or newer and Windows Server 2019 or newer. Windows Subsystem for Linux (WSL) is also supported. The exact runtime requirement depends on the language binding you choose, so do not assume that a Node.js instruction applies unchanged to Python, .NET, or Java.

Install and verify Node.js

Use a current supported Node.js release and npm. A current “Next” installation page lists Node.js 22.x, 24.x, and 26.x, but that page is not the stable requirements page; check the stable installation guidance when choosing a version for a new project.

  1. Install Node.js for Windows using your organization’s approved installer or package-management process.
  2. Open PowerShell and verify both commands resolve:
node --version
npm --version

If either command is not recognized, close and reopen PowerShell after installation. If it still fails, repair the Node.js installation or correct the Windows PATH before continuing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
LAPGEAR Home Office Pro Lap Desk - Black Carbon, Fits 15.6” Laptops
  • Spacious Design: Measuring 21.1" wide and 14.1" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
  • Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy ergonomic support with the integrated cushioned wrist rest.
  • Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
  • Durable Surface: Work with confidence on our lap desk's solid surface, featuring a sleek black carbon color, ensuring optimal air circulation to prevent your laptop from overheating.
  • On-the-Go Convenience: With an integrated handle and lightweight design (2.8 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.

Install Playwright Test in a new Node.js project

1. Initialize the project

In PowerShell, change to the folder where the test project should live, then run:

npm init playwright@latest

The interactive initializer asks whether to use JavaScript or TypeScript, what to name the tests folder, whether to add a GitHub Actions workflow, and whether to download Playwright browsers. Browser installation is selected by default. You can run the initializer in an existing npm project as well as in a new folder.

2. Answer the prompts deliberately

  • Choose TypeScript or JavaScript to match the rest of your project.
  • Keep the suggested tests folder unless your repository has an established convention.
  • Add the GitHub Actions workflow only if you want the generated CI file.
  • Allow browser downloads for a first local run unless your network policy requires a separate installation step.

The command creates a starter test, playwright.config.ts (or its JavaScript equivalent), and package metadata. Existing tests are not replaced when you run the initializer again.

Run the generated test and choose a browser mode

Headless test run

From the project directory, run:

npx playwright test

Tests run headlessly by default and the generated configuration normally defines projects for Chromium, Firefox, and WebKit. The configuration can change which projects run, their settings, and their parallelism.

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.

Useful local-run options

Goal Command Result
See the browser window npx playwright test --headed Runs with visible browser windows.
Run only Chromium npx playwright test --project=chromium Skips the other configured browser projects.
Use the interactive UI npx playwright test --ui Opens Playwright UI Mode for selecting and inspecting tests.

A passing starter test confirms that the Node.js package, configuration, test files, and at least one compatible browser executable are available.

Install browser binaries when setup skipped them

Installing the npm package and installing browser binaries are related but separate operations. Playwright’s browser documentation states: “Each version of Playwright needs specific versions of browser binaries to operate.” If you declined the download, a browser executable is missing, or you upgraded Playwright, run:

Rank #2
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
npx playwright install

To install only Chromium:

npx playwright install chromium

After a Playwright package update, rerun the install command if an executable is reported missing or the browser revision no longer matches the package.

Control browser storage and restricted-network downloads

Default cache location

On Windows, Playwright stores downloaded browsers by default under %USERPROFILE%AppDataLocalms-playwright. The browser guide describes the total size as a few hundred megabytes, so account for that space on developer machines and CI workers.

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

Use a custom cache directory

Set PLAYWRIGHT_BROWSERS_PATH before both installation and test execution. Keeping the variable set ensures that the test process looks in the same location where the binaries were installed.

$Env:PLAYWRIGHT_BROWSERS_PATH="$Env:USERPROFILEpw-browsers"
npx playwright install
npx playwright test

Proxy and certificate settings

If your network blocks the default Microsoft download CDN, configure the proxy in PowerShell before installing:

$Env:HTTPS_PROXY="http://proxy.example:8080"
npx playwright install

Do not set a proxy as a routine prerequisite on an unrestricted connection. If a TLS-inspecting proxy reports a self-signed certificate-chain error, the Playwright browser documentation describes pointing Node.js at your organization’s trusted certificate file:

$Env:NODE_EXTRA_CA_CERTS="C:pathtotrusted-ca.pem"
npx playwright install

Use the certificate file supplied by your administrator; do not disable certificate validation to work around the error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Yilador Webcam Cover 3 Pack, 0.03 inch Ultra Thin Laptop Camera Cover Slide
  • Note: Not suitable for MacBooks released after 2023 or devices with a protruding front camera; Not applicable to full-screen or notch-style tempered glass screen protectors; Do not use on the rear camera of the phone.
  • 💻 Why Do You Need a Webcam Cover Slide? — Safeguard your privacy by covering your webcam with our reliable webcam cover when not in use. Don't let anyone secretly watch you. Stay protected!
  • ✅ Thin & Stylish — Enhance your laptop's functionality and aesthetics with our 0.027" ultra-thin webcam covers. Seamlessly close your laptop while adding a touch of sophistication.
  • ✅ Fits Most Devices — Compatible with laptops, phones, tablets, desktops! Keep your privacy intact on Ap/ple, Mac/Book, iPh/one, iP/ad, H/P, L/novo, De/ll, Ac/er, As/us, Sa/msung devices.
  • ✅ 365 Days Protection — Our upgraded 3.0 adhesive ensures a strong hold that won't damage your equipment. Experience reliable, long-term privacy protection day in and day out.

Choose a language binding only if it matches your project

Node.js commands above install Playwright Test, not every Playwright binding. These workflows use different package managers, project scaffolding, and test integration.

Language Package/runtime guidance Typical installation sequence Project model
Node.js Node.js with npm npm init playwright@latest, then npx playwright test Playwright Test initializer and generated config
Python Python 3.8 or newer pip install playwright, then playwright install Python package plus the Playwright CLI; use the official Python test-runner guidance for framework integration
.NET .NET; the official guide recommends .NET 8 Create the .NET project, add the Playwright package, then run a generated script such as pwsh bin/Debug/net8.0/playwright.ps1 install .NET test integration and a PowerShell browser-install script
Java Java with Maven Follow the Maven-oriented Playwright guide and its dependency and browser-install commands Maven project and Java test integration

Python path

From a Python virtual environment, install the binding and then its browsers:

pip install playwright
playwright install

Keep the Python package version and browser binaries aligned just as you would for Node.js.

.NET path

Create or open your .NET test project, add the Playwright package specified by the .NET guide, build it, and run the generated installer. For a project targeting .NET 8, the script commonly has this form:

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.
pwsh bin/Debug/net8.0/playwright.ps1 install

The exact output directory changes with your target framework and build configuration.

Java path

Java projects use Maven rather than npm or pip. Add Playwright through the Maven instructions for your project, then follow that guide’s browser installation step. Do not substitute the Node.js initializer or Python CLI in a Java project.

Rank #4
AboveTEK Portable Laptop Lap Desk w/Retractable Left/Right Mouse Pad Tray, Non-Slip Heat Shield Tablet Notebook Computer Stand Table w/Sturdy Stable Work Surface for Bed Sofa Couch or Travel
  • Anti-Slip Surface - Transform your laptop into a mobile workstation with the AboveTEK portable laptop lap desk. The anti-slip surface provides a strong grip for laptops up to 15.6 inches(Diagonal), while the double rubber strip on the bottom ensures a stable display or typing experience on your lap, couch, or bed.
  • Retractable Mouse Pad - Retractable laptop mouse pad extends on both directions for the left/right handed with elevation along the edges for stopping mouse from falling off. The size of laptop tray is 14" X 9.7" and the size of mouse pad is 7.4" X 6.1".
  • Effective Heat Shield - The effective heat shield made of sturdy and thick material protects your laptop from overheating. Prioritizes your comfort and safety, an ideal lap pad or board for working anywhere.
  • EASY to Carry and Store - With an ergonomic and simplistic design, the lap desk is portable to store in a backpack. Only 15" in size, 2.2 lb of weight and with slim 0.6 inch thickness, it is ready to be easily carried around.
  • Widely Applicable - The smooth platform accommodates laptops and tablets up to 15.6 inches(Diagonal), making it a versatile accessory and one of the best gifts for mom, dad, students and professionals. Perfect for use as a laptop bed tray or tablet holder anywhere at home, library, or park.

Or skip the browser setup

If your goal is simply to obtain a clean website image or PDF rather than maintain a local Playwright project, ScreenshotNeo provides a single HTTP request and an MCP server for AI agents. The API accepts a URL and returns PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation for parameters.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Before capture, ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

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

The Free plan includes 1,000 screenshots per month with no card. Paid plans are Starter ($5 for 3,000), Growth ($15 for 15,000), Pro ($39 for 60,000), Scale ($99 for 250,000), and Business ($249 for 1,000,000); yearly billing gives two months free, and every feature is included on every plan.

Sign up for ScreenshotNeo to start with the free 1,000-shot monthly allowance and no card.

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

Troubleshoot common Windows setup failures

“node” or “npm” is not recognized

Node.js is missing or its installation directory is absent from PATH. Reinstall or repair Node.js, restart PowerShell, and rerun node --version and npm --version.

The browser executable is missing

The package is installed but its matching browser binaries are not. Run npx playwright install, or install only the project’s required engine with npx playwright install chromium. Repeat after a Playwright upgrade when the error indicates a revision mismatch.

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

Downloads fail behind a proxy

Set HTTPS_PROXY for the installation process. If the proxy re-signs certificates, set NODE_EXTRA_CA_CERTS to the trusted CA file provided by your administrator, then retry.

Best Value
Sale
LAPGEAR Home Office Lap Desk – Pink, Fits 15.6” Laptops
  • Spacious Design: Measuring 21.1" wide and 12" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
  • Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy laptop support with the integrated device ledge.
  • Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
  • Durable Surface: Work with confidence on our lap desk's solid surface, featuring a blush pink color, ensuring optimal air circulation to prevent your laptop from overheating.
  • On-the-Go Convenience: With an integrated handle and lightweight design (2.14 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.

Tests pass locally but fail on another Windows machine

Confirm that the same Playwright package and browser revision are installed on the second machine. Check whether the other machine uses a different PLAYWRIGHT_BROWSERS_PATH, has insufficient disk space, or requires proxy settings.

Only one browser runs

Inspect playwright.config.ts for configured projects and use npx playwright test --project=chromium only when you intentionally want Chromium. A project configuration can remove or alter the generated Chromium, Firefox, and WebKit projects.

The page is blank or times out

First separate a test failure from a download problem: run a known local or publicly reachable test URL, check the test’s waits and selectors, and inspect the browser output with --headed or UI Mode. If the browser itself never launches, return to the binary-install and proxy checks above.

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

Reliability, performance, and maintenance considerations

  • Keep versions coupled: update the npm, pip, .NET, or Maven package and its browser binaries as one change.
  • Cache deliberately: a shared custom browser directory can avoid repeated downloads, but ensure every worker uses a compatible Playwright version.
  • Start narrow: use --project=chromium while debugging, then run all configured browser projects for cross-engine coverage.
  • Use headless mode in automation: reserve --headed and UI Mode for diagnosis on an interactive desktop.
  • Plan disk and network access: browser files consume a few hundred megabytes and restricted networks may require proxy and certificate configuration.

FAQ

Will running the initializer again delete my existing tests?

No. The initializer can be rerun later to add or refresh project setup without overwriting existing test files.

Does the initializer default to JavaScript?

No. TypeScript is the default choice, but the prompt lets you select JavaScript instead.

Frequently Asked Questions

Will running the initializer again delete my existing tests?

No. The initializer can be rerun later without overwriting existing test files.

Does the initializer default to JavaScript?

No. TypeScript is selected by default, with JavaScript available in the prompt.

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

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.