This is documentation for the next version of Grafana k6 documentation. For the latest stable release, go to the latest version.
isConnected()
Caution
This feature has known issues. For details, refer to #453.
Indicates whether the CDP connection to the browser process is active or not.
Returns
Example
import { browser } from 'k6/browser';
export const options = {
scenarios: {
browser: {
executor: 'shared-iterations',
options: {
browser: {
type: 'chromium',
},
},
},
},
};
export default function () {
const isConnected = browser.isConnected();
console.log(isConnected); // true
}