session.status command

The session.status command of the session module returns information about whether the browser is able to create new BiDi sessions and may additionally include arbitrary meta information.

Since this command is used to check the status of the browser before creating a new session, it runs without an already active session. (In BiDi, such a command is called a static command.)

Syntax

json
{
  "method": "session.status",
  "params": {}
}

Parameters

None. However, you must include the params field and set it to an empty object ({}).

Return value

The following fields in the result object of the response describe the current status of the browser:

ready

A boolean that indicates whether the browser is ready to create new sessions.

true

The browser is ready to create a new session.

false

The browser cannot accept new sessions because it already has an active session or is otherwise in a state where creating a session would fail.

message

A string with information about the browser's current status.

Examples

Checking browser status before creating a session

With a WebDriver BiDi connection established, send the following message to check whether the browser is ready to create a new session:

json
{
  "id": 1,
  "method": "session.status",
  "params": {}
}

When the browser is available, it responds with:

json
{
  "id": 1,
  "type": "success",
  "result": {
    "ready": true,
    "message": ""
  }
}

If the browser already has an active session, the response might look as follows:

json
{
  "id": 1,
  "type": "success",
  "result": {
    "ready": false,
    "message": "Session already started"
  }
}

Specifications

Specification
WebDriver BiDi
# command-session-status

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
session.status command
Chrome – Full support
Chrome 126 (Release date: 2024-06-11)
footnote Full support
Edge – Full support
Edge 126 (Release date: 2024-06-13)
footnote Full support
Firefox – Full support
Firefox 97 (Release date: 2022-02-08)
footnote Full support
Opera – Full support
Opera 112 (Release date: 2024-07-11)
footnote Full support
Safari – No support
Safari
footnote
footnote See bug 280501
Chrome Android – Full support
Chrome Android 126 (Release date: 2024-06-11)
footnote Full support
Firefox for Android – Full support
Firefox for Android 97 (Release date: 2022-02-08)
footnote Full support
Opera Android – Full support
Opera Android 83 (Release date: 2024-06-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote
footnote See bug 280501
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Full support
WebView Android 126 (Release date: 2024-06-11)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote
footnote See bug 280501

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

See also