You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running the following test script against a remote chrome instance:
import{check}from'k6';import{browser}from'k6/experimental/browser';exportconstoptions={scenarios: {ui: {executor: 'shared-iterations',vus: 5,iterations: 1000,maxDuration: '40m',options: {browser: {type: 'chromium',},},},},thresholds: {checks: ["rate==1.0"]}}exportdefaultasyncfunction(){constcontext=browser.newContext();constpage=context.newPage();try{// Goto front page, find login link and click itawaitpage.goto('https://test.k6.io/',{waitUntil: 'networkidle'});awaitPromise.all([page.waitForNavigation(),page.locator('a[href="/my_messages.php"]').click(),]);// Enter login credentials and loginpage.locator('input[name="login"]').type('admin');page.locator('input[name="password"]').type('123');// We expect the form submission to trigger a navigation, so to prevent a// race condition, setup a waiter concurrently while waiting for the click// to resolve.awaitPromise.all([page.waitForNavigation(),page.locator('input[type="submit"]').click(),]);check(page,{'header': page.locator('h2').textContent()=='Welcome, admin!',});}finally{page.close();}}
I encountered the following error:
Uncaught (in promise) GoError: evaluating JS: execution context changed; most likely because of a navigation
at github.com/grafana/xk6-browser/api.Page.Close-fm (native)
at file:///tmp/POjeov/script.js:48:4(89)
executor=shared-iterations scenario=ui
This was unexpected since this script seems to have all the necessary actions in place to avoid an issue when a navigation occurs. Replicate and resolve this issue.
Test run id: 154442
The text was updated successfully, but these errors were encountered:
While running the following test script against a remote chrome instance:
I encountered the following error:
Uncaught (in promise) GoError: evaluating JS: execution context changed; most likely because of a navigation at github.com/grafana/xk6-browser/api.Page.Close-fm (native) at file:///tmp/POjeov/script.js:48:4(89) executor=shared-iterations scenario=ui
This was unexpected since this script seems to have all the necessary actions in place to avoid an issue when a navigation occurs. Replicate and resolve this issue.
Test run id: 154442
The text was updated successfully, but these errors were encountered: