Skip to content

Commit 356c2e4

Browse files
ankur22inancgumus
authored andcommitted
Update newContext to reflect 1-to-1 change
The discription on browser.newContext needs to reflect the new change where only one browserContext can be open at any given time per browser. We need to notify the user how they can work with this new behaviour.
1 parent 5fba848 commit 356c2e4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/newcontext--options--.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ title: 'newContext([options])'
33
excerpt: 'Browser module: newContext method'
44
---
55

6-
Creates and returns a new [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/).
6+
Creates and returns a new [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext/), if one hasn't already been initialized for the [Browser](/javascript-api/k6-experimental/browser). If one has already been initialized an error is thrown.
7+
8+
<Blockquote mod="note" title="">
9+
10+
A 1-to-1 mapping between [Browser](/javascript-api/k6-experimental/browser) and `BrowserContext` means you cannot run `BrowserContexts` concurrently. Due to this restriction, if one already exists, it must be [close](/javascript-api/k6-experimental/browser/browsercontext/close)d first before creating a new one.
11+
12+
</Blockquote>
713

814
<TableWithNestedRows>
915

0 commit comments

Comments
 (0)