No results for

Powered byAlgolia

Uses the BrowserContext to create a new Page and returns it.

Returns

TypeDescription
objectA new Page object.

Example

import { chromium } from 'k6/x/browser';
export default function () {
const browser = chromium.launch();
const context = browser.newContext();
const page = context.newPage();
page
.goto('https://test.k6.io/browser.php', {
waitUntil: 'networkidle',
})
.finally(() => {
page.close();
browser.close();
});
}