session.status commandThe 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.)
{
"method": "session.status",
"params": {}
}None. However, you must include the params field and set it to an empty object ({}).
The following fields in the result object of the response describe the current status of the browser:
messageA string with information about the browser's current status.
readyA 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.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"
}
}session.new commandsession.end command