</>

Technology

Playwright

Difficulty

Beginner

Interview Question

Which browsers does Playwright support?

Answer

Playwright Browser Support

Playwright supports three browser engines that cover all major browsers:

Browser EngineReal Browsers CoveredNotes
ChromiumGoogle Chrome, Microsoft EdgeUses latest Chromium build
FirefoxMozilla FirefoxUses latest Firefox release
WebKitApple SafariUses Safari's engine (not full Safari)

How Playwright Installs Browsers

When you install Playwright, it downloads its own managed browser binaries:

Bash
npx playwright install
# Downloads Chromium, Firefox, and WebKit

You can install specific browsers only:

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

Running Tests on All Browsers

In playwright.config.ts, define projects per browser:

TypeScript
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'firefox',  use: { ...devices['Desktop Firefox'] } },
    { name: 'webkit',   use: { ...devices['Desktop Safari'] } },
  ],
});

Run all browser projects:

Bash
npx playwright test --project=chromium
npx playwright test  # runs all configured projects

Key Differences from Selenium Browser Support

  • Playwright ships its own browser binaries — no need to install ChromeDriver/GeckoDriver separately
  • Tests run on the same browser versions regardless of what is installed on the machine
  • Ensures reproducible test results across all environments

Mobile Browser Emulation

Playwright can also emulate mobile devices:

TypeScript
{ name: 'Mobile Chrome', use: { ...devices['Pixel 5'] } },
{ name: 'Mobile Safari', use: { ...devices['iPhone 12'] } },

Follow AutomateQA

Related Topics