Back to Puppeteer

BrowserContext.pages() method

docs/api/puppeteer.browsercontext.pages.md

19.2.2775 B
Original Source

BrowserContext.pages() method

Gets a list of all open pages inside this browser context.

Signature

typescript
class BrowserContext {
  abstract pages(includeAll?: boolean): Promise<Page[]>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

includeAll

</td><td>

boolean

</td><td>

(Optional) experimental, setting to true includes all kinds of pages.

</td></tr> </tbody></table>

Returns:

Promise<Page[]>

Remarks

Non-visible pages, such as "background_page", will not be listed here. You can find them using Target.page().