Returns the current BrowserContext.
noteA 1-to-1 mapping between Browser and BrowserContext means you cannot run BrowserContexts concurrently. If you wish to create a new BrowserContext while one already exists, you will need to close the current one, and create a new one with either newContext or newPage. All resources associated to the closed BrowserContext will also be closed and cleaned up (such as Pages).
Returns
Type | Description |
---|---|
object | null | The current BrowserContext if one has been created, otherwise null. |