BrowserSession
Playwright\Symfony\Client\BrowserSessionInterface
An isolated browser context and page managed by a browser registry.
Methods
getContext()
?BrowserContextInterfaceReturns the isolated browser context, or null after the session is closed.
function getContext(): ?BrowserContextInterface
getPage()
?PageInterfaceReturns the session's page, or null after the session is closed.
function getPage(): ?PageInterface
setupRouting()
voidRegisters a request handler on the session's page.
function setupRouting(callable $routeHandler): void
close()
voidCloses the isolated browser context. Use BrowserRegistry::closeSession() for sessions managed by a registry so it can release its reference to the session immediately.
function close(): void