puppeteer/docs/api/puppeteer.browser.browsercontexts.md

22 lines
466 B
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Browser.browserContexts
---
# Browser.browserContexts() method
2023-09-18 09:05:23 +00:00
Gets a list of open [browser contexts](./puppeteer.browsercontext.md).
In a newly-created [browser](./puppeteer.browser.md), this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md).
2022-07-05 13:41:43 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class Browser {
2023-09-18 09:05:23 +00:00
abstract browserContexts(): BrowserContext[];
2022-07-05 13:41:43 +00:00
}
```
**Returns:**
[BrowserContext](./puppeteer.browsercontext.md)\[\]