No results for

Powered byAlgolia
⚠️ This documentation is outdated. Please visit grafana.com for the latest k6 documentation.📚

isConnected()

attention

This feature has known issues. For details, refer to #453.

Indicates whether the CDP connection to the browser process is active or not.

Returns

TypeDescription
booleanReturns true if Browser is connected to the browser application. Otherwise, returns false.

Example

import { chromium } from 'k6/experimental/browser';
export default function () {
const browser = chromium.launch();
const isConnected = browser.isConnected();
console.log(isConnected); // true
browser.close();
}