Hi, I am new to k6 browser and i have experience with playwright i am just wondering how can we achieve SSO /AAD login in k6 browser ,
I can able to acheive in playwright by setting the arguments as launchOptions.setArgs(Arrays.asList(“–auth-server-allowlist”,“–auth-server-whitelist=‘_’,”) and also added HTTPCredentials in browser new context options.
Similarly i tried in k6 browser but iam unable to login the application and its a blocker for me.Below code i have added in k6 browser and i noticed though we mention browser type as chromium but still the test is running on browser chrome , on chrome browser . Can we strictly run on chromium ?
import { browser } from ‘k6/experimental/browser’;
import { check } from ‘k6’;
export const options = {
scenarios: {
ui: {
executor: ‘shared-iterations’,
vus:2,
iterations:2,
options: {
browser: {
type:'chromium',
},
},
},
},
thresholds: {
checks: ['rate==1.0'],
},
};
export default async function () {
const context = browser.newContext( {
httpCredentials: {
username:‘username’,
password:‘password’,
},
ignoreHTTPSErrors: true,
});
const page = context.newPage();
try {
await page.goto('mfaurl');
page.waitForTimeout(6000);
} finally {
page.close();
}
}