No results for

Powered byAlgolia

⚠️ Compatibility

The xk6-browser API aims for rough compatibility with the Playwright API for NodeJS.

Because k6 does not run in NodeJS, the xk6-browser API will slightly differ from its Playwright counterpart.

Note that k6 APIs are synchronous.

Supported APIs

Missing Playwright APIs

The following missing APIs depends on event-loop support in k6:

🚧 xk6-browser is in beta - we are working to cover more Playwright APIs.

Examples

import launcher from 'k6/x/browser';
export default function () {
const browser = launcher.launch('chromium', { headless: false });
const context = browser.newContext();
const page = context.newPage();
page.goto('http://whatsmyuseragent.org/');
page.close();
browser.close();
}

Browser-level APIs