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
{
"method": "session.status",
"params": {}
}
Parameters
None. However, you must include the params field and set it to an empty object ({}).
Return value
The result object in the response with the following fields:
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:
{
"id": 1,
"method": "session.status",
"params": {}
}
When the browser is available, it responds with:
{
"id": 1,
"type": "success",
"result": {
"ready": true,
"message": ""
}
}
If the browser already has an active session, the response might look as follows:
{
"id": 1,
"type": "success",
"result": {
"ready": false,
"message": "Session already started"
}
}
Specifications
| Specification |
|---|
| WebDriver BiDi> # command-session-status> |
Browser compatibility
See also
session.newcommandsession.endcommand