No results for

Powered byAlgolia

The BrowserType is the entry point into launching a browser process; chromium is currently the only supported BrowserType. To use it, import chromium from the top level module k6/x/browser.

browserType.connect([options]) 🚧
Connect attaches k6 browser to an existing browser instance.
browserType.executablePath()Returns the path where the extension expects to find the browser executable.
browserType.launch([options])Launches a new browser process.
browserType.launchPersistentContext(userDataDir, [options]) 🚧
Launches the browser with persistent storage. the name of the BrowserType; currently it will return chromium.


import { chromium } from 'k6/x/browser';
export default function () {
const browser = chromium.launch();
const context = browser.newContext();
const page = context.newPage();
page.screenshot({ path: `example-chromium.png` });