No results for

Powered byAlgolia
⚠️ This is the archived documentation for k6 v0.46. Go to the latest version.

newPage()

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

Returns

TypeDescription
objectA new Page object.

Example

import { browser } from 'k6/experimental/browser';
export default async function () {
const page = browser.newPage();
try {
await page.goto('https://test.k6.io/browser.php');
} finally {
page.close();
}
}