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.

To run Playwright in Google’s branded Chrome, install Playwright, make sure Chrome is installed separately, and launch the Chromium browser type with channel: 'chrome'. Playwright otherwise uses its bundled Chromium build. The same channel setting belongs in a Playwright Test project when you are running a test suite.

Chrome can mean two different browsers

Playwright’s default browser is a Playwright-managed Chromium build. It is usually the right target for ordinary browser automation and cross-browser testing because its version is selected to match your Playwright package. Google Chrome is a separately installed, branded browser. Select it explicitly when you need to validate Chrome-specific behavior or a requirement names Google Chrome.

Target How Playwright starts it When to choose it Installation
Playwright Chromium Default launch, or channel: 'chromium' Routine automation and reproducible browser testing Install with Playwright’s browser installer
Google Chrome channel: 'chrome' Chrome-branded compatibility checks or a Chrome-specific requirement Chrome must already be installed separately

Choosing the Chrome channel does not guarantee compatibility with every enterprise-managed installation. Browser policies, permissions and security software can still prevent startup or control.

JavaScript: run a standalone script in Chrome

1. Install the package and compatible browser binaries

  1. From your project directory, install Playwright:
    npm install -D playwright
  2. Install the Playwright-managed Chromium binaries expected by the package:
    npx playwright install chromium

The second command installs Playwright’s supported browser assets; it does not install Google Chrome. Install Chrome through your operating system’s normal software channel if it is not already present. After upgrading Playwright, run the browser-install command again so the package and browser assets remain synchronized.

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

2. Launch the Chrome channel

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ channel: 'chrome' });
  const page = await browser.newPage();
  await page.goto('https://playwright.dev');
  console.log(await page.title());
  await browser.close();
})();

Save this as example.js and run:

node example.js

The script opens the branded Chrome channel, navigates to the URL, prints its title and closes the browser. Playwright is headless by default, so no window appears.

Show the Chrome window

Use headless: false when you need to watch the steps or debug a page:

const browser = await chromium.launch({
  channel: 'chrome',
  headless: false
});

Keep the browser close in a finally block in production scripts so failures do not leave processes running:

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ channel: 'chrome', headless: false });
  try {
    const page = await browser.newPage();
    await page.goto('https://playwright.dev', { waitUntil: 'domcontentloaded' });
    console.log(await page.title());
  } finally {
    await browser.close();
  }
})();

Chrome’s newer headless implementation is different from Playwright’s default Chromium headless shell. Playwright quotes Chrome documentation describing new headless as “the real Chrome browser” and therefore more authentic, reliable and featureful; choose headed or headless mode according to what you are validating.

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

Python: run Playwright in Chrome

Install Python Playwright

pip install playwright
playwright install

The installer command downloads the browser assets required by your Playwright package. Google Chrome still has to be installed separately for the chrome channel.

Use the synchronous API

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(channel="chrome")
    page = browser.new_page()
    page.goto("https://playwright.dev")
    print(page.title())
    browser.close()

Run the file with python example.py. For an asyncio application, use Playwright’s asynchronous API and await p.chromium.launch(channel="chrome"), page navigation and browser shutdown in the same order.

Run visibly while debugging

browser = p.chromium.launch(channel="chrome", headless=False)

Headless is the default in Python as well. A visible browser requires a graphical session; on a remote Linux server, use an appropriate display or run headless.

Playwright Test: configure a Chrome project

Test suites normally use @playwright/test rather than the lower-level playwright package. Define a project whose use options select the branded channel:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { defineConfig } from '@playwright/test';

export default defineConfig({
  projects: [
    {
      name: 'Google Chrome',
      use: { channel: 'chrome' },
    },
  ],
});

Run every configured project with:

npx playwright test

Run only this project with:

npx playwright test --project="Google Chrome"

A test can then use the normal page fixture:

import { test, expect } from '@playwright/test';

test('home page has a title', async ({ page }) => {
  await page.goto('https://playwright.dev');
  await expect(page).toHaveTitle(/Playwright/);
});

Keep a separate Chromium project if you want both the reproducible bundled browser and branded Chrome in the same run. Give each project a distinct name so command-line selection and reports are unambiguous.

Installation and version checks

Keep package and browser versions aligned

Playwright expects browser versions associated with its package release. When you update the package, rerun npx playwright install chromium (or playwright install in Python). A missing executable usually means the browser assets were never installed, were removed from a cache, or belong to a different package version.

Linux system dependencies

On Linux, a browser can be installed yet fail before a page opens because shared libraries are missing. Install Chromium and its supported dependencies with:

npx playwright install --with-deps chromium

Use the equivalent playwright install --with-deps chromium command in a Python environment where the CLI supports it. This changes system packages, so follow your organization’s privilege and change-control rules.

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

Do not make executablePath your default fix

Pointing Playwright at an arbitrary Chrome binary with executablePath can work, but Playwright warns that compatibility with unrecognized browser versions is not guaranteed. Prefer the documented channel: 'chrome' option when you need branded Chrome. Use an explicit path only when you control the exact binary and accept the maintenance responsibility.

Choosing Chrome or bundled Chromium

  • Use bundled Chromium for most automated checks, reproducible CI runs and general cross-browser work. It tracks the version supported by your Playwright release and avoids dependence on a workstation’s Chrome updates.
  • Use branded Chrome when Chrome-specific behavior is the subject of the test, a release gate explicitly names Google Chrome, or you need to exercise the installed product’s policies and integrations.
  • Use both when a project must detect differences between Playwright’s supported Chromium and the branded browser. Report failures with the browser name and channel; do not assume a pass in one proves a pass in the other.

Selecting a channel is not a way around enterprise policy. Managed profiles, forbidden automation settings, endpoint protection or restricted permissions can still block launch.

Troubleshooting common failures

Symptom Likely cause Fix
“Executable doesn’t exist” or missing browser error Playwright browser assets are absent or stale Run npx playwright install chromium for JavaScript, or playwright install chromium for Python, using the current package environment.
Chrome channel cannot be found Google Chrome is not installed, or the installation is outside the supported channel locations Install branded Chrome separately and verify the machine’s policy allows it. Use bundled Chromium if branded Chrome is not required.
Linux launch fails with library/dependency messages Required system packages are missing Run npx playwright install --with-deps chromium where permitted, then retry.
Nothing appears on screen Playwright is headless by default, or the process has no graphical display Set headless: false (JavaScript) or headless=False (Python) on a machine with a usable display.
Works locally but fails on a managed workstation Enterprise browser policy, endpoint protection or restricted permissions Ask the administrator which Chrome policies apply, test with the supported bundled Chromium channel, and avoid bypassing controls.
Unexpected behavior after a Playwright upgrade Package and browser binaries are from different releases Reinstall the browser assets and pin versions in CI so upgrades are deliberate.
Navigation hangs or the title is empty Network, authentication, redirects or page readiness differs from the default timeout assumptions Check the URL manually, inspect console/network errors, and choose an explicit wait condition such as domcontentloaded or a locator-based assertion.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Reliability and performance practices

  • Create one browser per worker or job and reuse contexts and pages where isolation permits; launching a new browser for every assertion adds overhead.
  • Close contexts and browsers in teardown code, especially when a test fails.
  • Use locator assertions instead of arbitrary sleeps whenever possible. If a site genuinely needs extra time, wait for a selector, navigation state or a bounded delay.
  • Pin Playwright versions in continuous integration and run the matching browser installer during environment setup.
  • Capture logs, the selected channel, headless setting and operating-system details when diagnosing a failure. A “Chrome” failure is otherwise easy to confuse with a bundled-Chromium failure.
  • Do not treat illustrative cache-folder measurements as a current storage promise. Browser download size varies by release, operating system and installed components.

Or skip the browser setup

If your goal is simply to obtain a clean image or PDF of a URL rather than exercise Playwright code, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP or PDF, while the service handles browser setup for you.

Example cURL request (see the ScreenshotNeo API documentation):

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.
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)
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}`);
  • Cookie banners, newsletter popups and chat widgets are removed before the shot.
  • Bot checks, blank pages, failed loads and timeouts are not billed; cache hits are also free, and response headers identify the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.

Create a free ScreenshotNeo account to try it without a card.

Frequently asked questions

Frequently Asked Questions

Does Playwright install Google Chrome automatically?

No. Playwright installs its own supported browser binaries; the branded Chrome channel requires Google Chrome to be installed separately.

Can I use the Chrome channel in CI?

Yes, provided the CI image contains a compatible Chrome installation and permits browser launch. Otherwise use Playwright’s bundled Chromium, which is generally easier to reproduce.

Is channel: 'chrome' the same as setting an executable path?

No. The channel is Playwright’s supported way to request branded Chrome. An arbitrary executablePath may point to an unsupported browser version.

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

Why would a headed run fail on a server?

A headed browser needs a graphical display. Servers without one should run headless or provide an approved display environment.

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.