BrowserType
Playwright\Browser\BrowserTypeInterface
Methods
connect()
BrowserInterfaceAttaches Playwright to an existing browser instance.
function connect(string $wsEndpoint, array $options = []): BrowserInterface
connectOverCDP()
BrowserInterfaceAttaches 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()
stringReturns the path where Playwright expects to find a bundled browser executable.
function executablePath(): string
launch()
BrowserInterfaceLaunches and returns a browser instance.
function launch(array $options = []): BrowserInterface
launchPersistentContext()
BrowserContextInterfaceLaunches a browser with persistent storage and returns a browser context instance.
function launchPersistentContext(string $userDataDir, array $options = []): BrowserContextInterface
launchServer()
BrowserServerInterfaceLaunches a browser server that can be connected to later.
function launchServer(array $options = []): BrowserServerInterface
name()
stringReturns the browser name.
function name(): string