No results for

Powered byAlgolia
attention

This feature has known issues. For details, refer to #444.

Returns all open Pages in the BrowserContext.

Returns

TypeDescription
arrayAll open pages.

Example

import { chromium } from 'k6/x/browser';
export default function () {
const browser = chromium.launch();
const context = browser.newContext();
context.newPage();
const pages = context.pages();
console.log(pages.length); // 1
context.close();
browser.close();
}