Skip to content

Commit 76a32df

Browse files
ankur22ka3de
authored andcommitted
Update src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/context.md
Co-authored-by: ka3de <[email protected]>
1 parent 2ba2508 commit 76a32df

File tree

1 file changed

+3
-3
lines changed
  • src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export const options = {
3939
export default function () {
4040
console.log(browser.context()); // null
4141

42-
const page = browser.newPage();
43-
const context = browser.context();
44-
console.log(context); // {"base_event_emitter":{}}
42+
const page1 = browser.newPage(); // implicitly creates a new browserContext
43+
const context = browser.context(); // underlying live browserContext associated with browser
44+
const page2 = context.newPage(); // shares the browserContext with page1
4545

4646
page.close();
4747
context.close();

0 commit comments

Comments
 (0)