I have a situation where iterating over all 'a' tags and printing them produces a different smaller list when run in k6 vs directly in the browser window that is being controlled.
const printAllAnchors = async (page) => {
const elements = await page.$$('a');
console.log(elements.length);
for (let i = 0; i < elements.length; i++) {
const e = elements[i];
const text = await e.textContent();
console.log(text);
}
}
In k6 this shows 14 anchor tags where as in the chrome tab/console I get 58 anchor tags.
Brief summary
I have a situation where iterating over all 'a' tags and printing them produces a different smaller list when run in k6 vs directly in the browser window that is being controlled.
In k6 this shows 14 anchor tags where as in the chrome tab/console I get 58 anchor tags.
xk6-browser version
v0.44.1
OS
macos
Chrome version
canary latest
Docker version and image (if applicable)
No response
Steps to reproduce the problem
A test that navigates to
https://xxx.sandbox.lightning.force.com/lightning/r/Contact/0037A00000oo1nuQAA/view
Expected behaviour
the list of anchor tags is complete.
Actual behaviour
This list of anchor tags is many fewer than a direct query in the same chrome tab.