Browser
Playwright\Browser\BrowserInterface
Methods
context()
BrowserContextInterfacefunction context(): BrowserContextInterface
newContext()
BrowserContextInterfacefunction newContext(array $options = []): BrowserContextInterface
newPage()
PageInterfacefunction newPage(array $options = []): PageInterface
close()
voidfunction close(): void
contexts()
arrayfunction contexts(): array
browserType()
BrowserTypeThe browser engine this instance was launched with.
function browserType(): BrowserType
isConnected()
boolfunction isConnected(): bool
version()
stringfunction version(): string
bind()
stringExposes 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()
voidTears down the server started by bind(); does nothing when the browser is not bound.
function unbind(): void