Browsers, Browser Types, and Channels

September 3, 2026 ยท View on GitHub

Playwright PHP can launch Playwright-managed Chromium, Firefox, and WebKit. It can also launch supported Google Chrome and Microsoft Edge distributions through Chromium channels. Installation and launch configuration are separate choices.

Choose what to install

Install Playwright's default managed browser set:

vendor/bin/playwright-install --browsers

This installs Chromium, Firefox, and WebKit, together with the support binaries required by the bundled Playwright version.

Install only the browser targets your project needs by passing their names:

vendor/bin/playwright-install chromium
vendor/bin/playwright-install chromium webkit

The installer accepts these targets:

TargetInstallation
chromiumPlaywright-managed Chromium
firefoxPlaywright-managed Firefox
webkitPlaywright-managed WebKit
chromeGoogle Chrome stable
chrome-betaGoogle Chrome Beta
msedgeMicrosoft Edge stable
msedge-betaMicrosoft Edge Beta

--browsers cannot be combined with explicit targets. Use one form or the other.

The installer does not treat browser names as aliases. In particular, chrome installs Google Chrome and does not install Playwright-managed Chromium. There is no safari target because Playwright uses a patched WebKit build, not the installed Safari application.

Understand branded browser installation

Google Chrome and Microsoft Edge are installed in the operating system's global location. Playwright warns that this can replace an existing installation. PLAYWRIGHT_BROWSERS_PATH does not redirect branded browser installations.

Use a branded browser when the test specifically needs its stable or beta distribution. For general automation, Playwright recommends its managed Chromium build.

Choose a browser type at runtime

Browser types are the three Playwright API families used to launch browsers:

PHP methodBrowser typeDefault installation
$playwright->chromium()Chromiumchromium
$playwright->firefox()Firefoxfirefox
$playwright->webkit()WebKitwebkit

Playwright::safari() is an existing alias for WebKit. It does not automate Apple Safari.

Installing several browsers does not make a script run in all of them. Each launch still selects one browser type.

Launch a Chromium channel

A channel selects a Chromium distribution at launch. It is not another browser type.

<?php

declare(strict_types=1);

require __DIR__.'/vendor/autoload.php';

use Playwright\Configuration\PlaywrightConfigBuilder;
use Playwright\PlaywrightFactory;

$config = PlaywrightConfigBuilder::create()
    ->withChannel('chrome')
    ->build();

$playwright = PlaywrightFactory::create($config);
$browser = $playwright->chromium()->launch();

Install the matching branded target before using a channel on a machine where that browser is absent:

vendor/bin/playwright-install chrome

PW_CHANNEL=chrome provides the same launch choice when configuration is built with PlaywrightConfigBuilder::fromEnv().

Keep the browser cache consistent

Set PLAYWRIGHT_BROWSERS_PATH during installation and at runtime when managed browsers use a custom cache:

PLAYWRIGHT_BROWSERS_PATH=var/playwright-browsers vendor/bin/playwright-install chromium

Browser revisions are tied to the Playwright version. Run the installer again after updating Playwright when its required browser revisions change.

See the official Playwright browser guide for current browser behavior and platform support.