BrowserType

Playwright\Browser\BrowserTypeInterface

Methods

connect()

BrowserInterface

Attaches Playwright to an existing browser instance.

function connect(string $wsEndpoint, array $options = []): BrowserInterface

connectOverCDP()

BrowserInterface

Attaches Playwright to an existing browser instance using the Chrome DevTools Protocol. Only supported for Chromium-based browsers.

function connectOverCDP(string $endpointURL, array $options = []): BrowserInterface

executablePath()

string

Returns the path where Playwright expects to find a bundled browser executable.

function executablePath(): string

launch()

BrowserInterface

Launches and returns a browser instance.

function launch(array $options = []): BrowserInterface

launchPersistentContext()

BrowserContextInterface

Launches a browser with persistent storage and returns a browser context instance.

function launchPersistentContext(string $userDataDir, array $options = []): BrowserContextInterface

launchServer()

BrowserServerInterface

Launches a browser server that can be connected to later.

function launchServer(array $options = []): BrowserServerInterface

name()

string

Returns the browser name.

function name(): string