Skip to main content
Playwright is the main entry point for all browser automation. It provides access to browser types (Chromium, Firefox, WebKit), devices, and utilities.

Inheritance

Extends: ChannelOwner

Properties

chromium

BrowserType
BrowserType instance for launching or connecting to Chromium browsers.

firefox

BrowserType
BrowserType instance for launching or connecting to Firefox browsers.

webkit

BrowserType
BrowserType instance for launching or connecting to WebKit browsers.

devices

object
Registry of device descriptors for mobile emulation. Contains pre-configured settings for popular devices.

selectors

Selectors
Selectors engine instance for customizing element selection behavior.

request

APIRequest
API request context for making HTTP requests outside of a browser context.

errors

object
Object containing Playwright-specific error classes.
  • TimeoutError: Thrown when operations exceed their timeout

Usage Examples

Basic Browser Launch

Using Device Emulation

Making API Requests