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

Use three separate checks. In VS Code, verify (1) the Microsoft Playwright extension, (2) the Playwright package and CLI resolved by your current project, and (3) the browser binaries that Playwright can launch. A green result in one layer does not prove the other two are installed.

The quickest project check is to open VS Code’s integrated terminal at your project root and run npx playwright --version. Then run npx playwright install --list if you need to confirm that Chromium, Firefox, or WebKit binaries are present.

What “installed in VS Code” can mean

Playwright has three independent pieces. Treating them as one installation is the source of most confusing setup reports.

Layer What it establishes How to check
VS Code extension Editor integration such as the Playwright sidebar, test discovery, run controls, and debugging. Open Extensions and confirm the official Playwright extension from Microsoft is enabled.
Project package and CLI The open workspace can resolve Playwright from its own dependencies and run its command-line tools. From the project root, run npx playwright --version (or the Yarn/pnpm equivalent).
Browser binaries The Playwright-managed Chromium, Firefox, or WebKit executables needed by tests are downloaded. Run npx playwright install --list.

These checks are complementary. The extension can be installed while the project has no Playwright dependency; the CLI can print a version while browser binaries are missing; and browsers can remain on disk after an extension is disabled. The official VS Code guide describes the extension and project setup, while the browser documentation covers version and binary management (VS Code guide; browser management).

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

1. Check the Playwright extension in VS Code

  1. Open VS Code.
  2. Open Extensions with Ctrl+Shift+X on Windows or Linux, or Cmd+Shift+X on macOS.
  3. Search for Playwright.
  4. Open the result published by Microsoft and confirm that it is installed and enabled for the current profile.

The extension adds editor features, but it is not the npm package. If you only want to know whether the editor integration exists, this is the complete check. If you intend to run tests, continue with the project and browser checks.

Confirm that the extension is actually active

Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and search for Playwright commands. A Playwright testing view or test controls should appear when the extension is active and a recognizable Playwright project is open. If the commands are absent, check that the extension is enabled in the active VS Code profile and that the window has been reloaded after installation.

2. Check the Playwright package and CLI in the open project

Use the integrated terminal so the command runs in the same workspace you plan to test. In the Explorer, right-click the project folder and choose Open in Integrated Terminal, or use Terminal → New Terminal and verify the prompt is at the repository root. In a monorepo, change into the package that declares Playwright rather than a parent directory with no dependency.

npm

Run:

npx playwright --version

A successful command prints the Playwright version resolved by npx. This is the documented version check (Playwright browser documentation).

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

Yarn

yarn playwright --version

Yarn invokes the workspace’s dependency using the package manager’s resolution rules.

pnpm

pnpm exec playwright --version

Use the command that matches the package manager recorded by the project. A global Playwright installation is not evidence that this workspace can resolve its local dependency; local resolution is what matters for reproducible tests (Playwright best practices).

Read the result correctly

  • Version printed: the current directory can invoke a Playwright CLI.
  • “Command not found” or package-resolution error: Playwright is not available through that project’s dependencies, the terminal is in the wrong folder, or dependencies have not been installed.
  • A different version than expected: inspect the project’s lockfile and package manifest, then run the command from the package that owns the tests.

Do not use a version result to infer that browsers are installed. That is a separate check.

3. Check whether Playwright browsers are installed

From the same project directory, run:

npx playwright install --list

The command lists Playwright-managed browser installations visible to that Playwright release (browser installation documentation). Look for the browser your configuration uses, such as Chromium, Firefox, or WebKit.

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

If the list is empty or incomplete

Install the default browser set with:

npx playwright install

To install one browser only, name it, for example:

npx playwright install chromium

Playwright browser revisions are tied to Playwright releases. Updating the package can therefore require a fresh browser download even when an older executable remains on the machine.

Linux and CI system dependencies

On Linux runners, the browser may be downloaded but still fail to launch because operating-system libraries are absent. Install those dependencies with:

npx playwright install-deps

Or combine browser and dependency installation:

npx playwright install --with-deps

The command-line reference documents these options and is especially relevant to clean CI images (Playwright command-line reference).

4. Let the VS Code extension set up a project

If the package is not configured yet, the supported extension-led workflow is:

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.
  1. Open the Command Palette.
  2. Run Test: Install Playwright.
  3. Choose the browsers the project should install.
  4. Allow the extension to create the Playwright project files and install dependencies.
  5. If offered, choose whether to add a GitHub Actions workflow.

The exact prompts can change with extension releases, but the command is the official starting point in Microsoft’s guide (VS Code setup guide). After the wizard completes, repeat the version and browser-list commands to verify the resulting workspace rather than assuming the wizard finished every layer.

5. A complete verification checklist

  1. Extension: Extensions view → Microsoft Playwright → Installed and Enabled.
  2. Workspace: Integrated terminal opened at the directory containing the relevant package manifest.
  3. CLI: npx playwright --version, yarn playwright --version, or pnpm exec playwright --version prints a version.
  4. Browsers: npx playwright install --list shows the browser required by the project.
  5. Smoke test: Use the Playwright test view to run one existing test, or run your project’s documented test command, and confirm that a browser launches.

Only after all five checks pass can you say that the editor, project dependency, and runnable browser environment are ready together.

Troubleshooting common failures

The extension is installed, but no tests appear

Check that the opened folder is the project root and contains the Playwright configuration and tests. Then reload the VS Code window and confirm the extension is enabled in the active profile. An extension alone does not add the package to a project.

npx playwright --version fails

First print the terminal’s current directory and compare it with the folder that contains package.json. Install the project’s dependencies with its normal package-manager command, then retry. In a monorepo, run the command inside the workspace that declares Playwright. If the repository uses Yarn or pnpm, use the matching invocation instead of mixing package managers.

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

The version prints, but launching a test says an executable is missing

Run npx playwright install --list. If the required browser is absent, install it with npx playwright install or a specific browser name. If the executable exists but Linux reports missing shared libraries, use npx playwright install --with-deps or install the operating-system packages through your CI image.

Browsers were installed before a package upgrade

Run the browser-list command again after the upgrade. If the new release expects different revisions, run npx playwright install to synchronize them.

A global installation gives a version, but the project still fails

Ignore the global result for project verification. Remove ambiguity by running the package-manager command from the workspace and checking the project’s manifest and lockfile. Tests should use the dependency pinned by that project, not an unrelated global binary.

The extension wizard cannot complete

Verify that Node.js (preferably an LTS release) and VS Code are installed, as required by the extension guide. Check network access to the package and browser download endpoints, then run the wizard again or install the package through the project’s normal package-manager workflow before installing browsers separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is simply to capture a page image or PDF rather than author and debug Playwright tests, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each 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.

One GET request returns PNG, JPEG, WebP, or PDF. See the parameter reference in the ScreenshotNeo documentation.

cURL

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

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://playwright.dev"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://playwright.dev' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Features include full-page and element capture, device presets, custom viewports, dark mode, retina scale, PDF controls, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user-agent, authorization, timezone, geolocation, transparent backgrounds, resizing, configurable caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, and a usage API.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is included on every plan, and yearly billing provides two months free. Create a free ScreenshotNeo account to start.

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

Performance, reliability, and cost considerations

  • Keep the terminal in the intended workspace so the version check measures the dependency your tests will use.
  • Cache browser downloads in CI when possible, but refresh them after Playwright upgrades because revisions can change.
  • Install only the browser engines your test suite needs to reduce download time and disk use.
  • Use --with-deps on disposable Linux runners where system libraries are not guaranteed.
  • Do not treat a successful CLI response as a full health check; a one-test smoke run catches launch and environment problems that version output cannot.

What to report when asking for help

Include your operating system, VS Code version, active package manager, the directory from which you ran the command, the exact Playwright version output, the output of npx playwright install --list, and the complete launch error. This separates extension, dependency, browser, and system-library issues so another developer can reproduce the failing layer.

Frequently Asked Questions

Does Playwright need to be installed globally for VS Code?

No. Project-local installation is the reliable arrangement; the package manager should resolve the version declared by the workspace.

Can I keep multiple Playwright versions on one computer?

Yes. Different projects can resolve different package versions, but each project should install and use the browser revisions expected by its own version.

Where should browser downloads happen in continuous integration?

Run the Playwright browser installation during CI image preparation or the job setup, using the same package version that the tests install.

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.