Closed ankur22 closed 11 months ago
This issue was fixed with https://github.com/grafana/xk6-browser/pull/1035. I've tested the changes with the latest version of main
(86329fbb36f04c962073298c25233553a952e4f9) and the following script and the test times out as expected, unlike the previous behaviour where it didn't time out:
import { browser } from 'k6/experimental/browser';
export const options = {
scenarios: {
ui: {
executor: 'shared-iterations',
iterations: 1,
options: {
browser: {
type: 'chromium'
},
},
},
},
}
export default async function () {
const page = browser.newPage();
const context = browser.context();
context.setDefaultNavigationTimeout(1);
page.goto('https://maps.google.com');
page.close();
}
Tested against: dbede120c63df43995813a847a25b0e66e289592
If you run the following scripts then you should find that the PW script fails with a timeout error, whereas the xk6-browser script succeeds.
xk6-browser Script:
PW script: