Replies: 1 comment
-
Hi, please don't open multiple issues and now a discussion thread. We saw the 2 issues you opened, and will respond in #488 soon. In general, we handle support questions via the community forum, so that's the best place to ask a question or get help from the community. If you're certain an issue is a bug or have a feature request, then creating an issue here is OK. I think this a bug, so let's keep the discussion in #488. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
K6 browser testing when headless = true the page.$('#react-select-partner-filter-id-input').press('Enter'); throws error
ERRO[0031] typing text "Dashboard QA Testing v2": context canceled
We have a simple web page with two React-Select dropdowns on it.
When we run the k6 Browser tests with headless: false option then our test script works perfectly fine. It opens a new browser, it focuses on the first dropdown and then inserts the value of the dropdown and then move on to the next dropdown and selects its value, all works fine; however, as soon as we change the settings to headless: true then we starts getting the above error.
ERRO[0031] typing text "Dashboard QA Testing v2": context canceled
NOTE: Please note its not a normal options values dropdown; its a react-select dropdown control on our page.
Our test script:
const browser = launcher.launch('chromium', { headless: true});
const context = browser.newContext();
const page = context.newPage();
page.goto(newMagicLinkUrl); // some URL
page.waitForLoadState('networkidle');
page.waitForSelector('div[class="col-3"]');
page.waitForSelector('#partner-filter-id');
// First Dropdown
page.$('#react-select-partner-filter-id-input').focus();
page.$('#react-select-partner-filter-id-input').type('Dashboard QA Testing');
page.$('#react-select-partner-filter-id-input').press('Enter');
// Second DropDrown
page.waitForSelector('#client-filter-id');
page.waitForSelector('#react-select-client-filter-id-input');
page.$('#react-select-client-filter-id-input').focus();
page.$('#react-select-client-filter-id-input').type('Dashboard QA Testing v2');
page.$('#react-select-client-filter-id-input').press('Enter');
At this line page.$('#react-select-partner-filter-id-input').press('Enter'); we have some kind of issue which we do not understand because we get the follow errors on that line.
Sometimes we get the a websocket closed messages. But the same tests script works perfectly fine with { headless: false} scenario.
RRO[0031] err:read tcp 127.0.0.1:62545->127.0.0.1:62544: wsarecv: An existing connection was forcibly closed by the remote host. category="Connection:handleIOError" elapsed="0ms" goroutine=16
ERRO[0031] typing text "Dashboard QA Testing v2": context canceled
Please give your suggestions.
Its a simple scenario, we have two dropdowns on the page, we need to select the first dropdown value and then second. thats all we need and K6 Page.Press('Enter') command for pressing "Enter" is failing.
Beta Was this translation helpful? Give feedback.
All reactions