Browser

Playwright\Browser\BrowserInterface

Methods

context()

BrowserContextInterface
function context(): BrowserContextInterface

newContext()

BrowserContextInterface
function newContext(array $options = []): BrowserContextInterface

newPage()

PageInterface
function newPage(array $options = []): PageInterface

close()

void
function close(): void

contexts()

array
function contexts(): array

browserType()

BrowserType

The browser engine this instance was launched with.

function browserType(): BrowserType

isConnected()

bool
function isConnected(): bool

version()

string
function version(): string

bind()

string

Exposes this browser so other Playwright clients can connect to it and drive it. Binding twice without an intervening unbind() is an error.

function bind(string $title, array $options = []): string

unbind()

void

Tears down the server started by bind(); does nothing when the browser is not bound.

function unbind(): void