---
title: "isConnected() | Grafana k6 documentation"
description: "Browser module: isConnected method"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# isConnected()

> Caution
> 
> This feature has **known issues**. For details, refer to [#453](https://github.com/grafana/xk6-browser/issues/453).

Indicates whether the [CDP](https://chromedevtools.github.io/devtools-protocol/) connection to the browser process is active or not.

### Returns

Expand table

| Type    | Description                                                                                                                                             |
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| boolean | Returns `true` if the [browser module](/docs/k6/latest/javascript-api/k6-browser/) is connected to the browser application. Otherwise, returns `false`. |

### Example

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
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
}
```
