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
|
|
|
|
2022-10-24 07:07:05 +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)\[\]
|