When running the sample script below using the command
./xk6-browser run browser_test.js
I’m getting the windows “How do you want to open this file?” popup and if I select Chrome from the list the x6-browser downloads again.
browser_test.js
import { chromium } from ‘k6/x/browser’;
export default function () {
const browser = chromium.launch({
headless: false,
slowMo: ‘500ms’,
});
const context = browser.newContext();
const page = context.newPage();
page.goto(‘https://test.k6.io/browser.php/’);
page.screenshot({ path: example-chromium.png
});
page.close();
browser.close();
}