puppeteer/docs/api/puppeteer.browser.pages.md

26 lines
663 B
Markdown
Raw Permalink Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Browser.pages
---
# Browser.pages() method
2023-09-21 09:09:27 +00:00
Gets a list of all open [pages](./puppeteer.page.md) inside this [Browser](./puppeteer.browser.md).
2023-09-18 09:05:23 +00:00
If there ar multiple [browser contexts](./puppeteer.browsercontext.md), this returns all [pages](./puppeteer.page.md) in all [browser contexts](./puppeteer.browsercontext.md).
2022-07-05 13:41:43 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class Browser {
pages(): Promise<Page[]>;
}
```
**Returns:**
Promise&lt;[Page](./puppeteer.page.md)\[\]&gt;
## Remarks
2023-09-18 09:05:23 +00:00
Non-visible [pages](./puppeteer.page.md), such as `"background_page"`, will not be listed here. You can find them using [Target.page()](./puppeteer.target.page.md).