Skip to main content
Context lifecycle methods for the Playwright driver.

pages

Returns all open pages in the context. Upstream docs
result
RemotePlaywrightPage[]
Return value
await context.pages();

newPage

Creates a new page in the browser context. Upstream docs
result
RemotePlaywrightPage
Return value
await context.newPage();

close

Closes the browser context. All the pages that belong to the browser context will be closed.
The default browser context cannot be closed.
Upstream docs
options
{ reason?: string }
await context.close();