Session Commands

Microsoft Edge supports the following session-related WebDriver commands:

HTTP RequestCommands
/sessionNew Session
/sessionsSessions
/session/{sessionId}Delete, Get Capabilities
/session/{sessionId}/timeoutsSet Timeout

New Session

NameNew Session
DescriptionCreates a new session.
SpecW3C WebDriver
HTTP RequestPOST /session

JSON Parameters

{
    "desiredCapabilities": {
        "browserName": "<browserName>",
        "browserVersion": "<browserVersion>",
        "platformName": "Windows NT",
        "platformVersion": "10"
    },
    "requiredCapabilities": {}
}

JSON Response Value

{
    "sessionId": "{sessionId}",
    "status": 0,
    "value": {
        "browserName": "MicrosoftEdge",
        "browserVersion": "20.10192.0.0",
        "platformName": "windows",
        "platformVersion": "10",
        "takesElementScreenshot": true,
        "takesScreenshot": true,
        "acceptSslCerts": true,
        "pageLoadStrategy": "normal"
    }
}

Sessions

NameSessions
DescriptionReturns a list of the currently active sessions.
SpecJSON Wire Protocol
HTTP RequestGET /sessions

JSON Parameters
None.

JSON Response Value

{
    "status": "success",
    "value": [
        {
            "id": "{sessionId}",
            "capabilities": {
                "browserName": "MicrosoftEdge",
                "browserVersion": "20.10192.0.0",
                "platformName": "windows",
                "platformVersion": "10",
                "takesElementScreenshot": true,
                "takesScreenshot": true,
                "acceptSslCerts": true,
                "pageLoadStrategy": "normal"
            }
        }
    ]
}

Delete Session

NameDelete Session
DescriptionDeletes the specified session.
SpecW3C WebDriver, JSON Wire Protocol
HTTP RequestDELETE /session/{sessionId}

JSON Parameters
None.

JSON Response Value

{
    "sessionId": "{sessionId}",
    "status": 0,
    "value": null
}

Get Capabilities

NameGet Capabilities
DescriptionRetrieves the capabilities of the specified session.
SpecJSON Wire Protocol
HTTP RequestGET /session/{sessionId}

JSON Parameters
None.

JSON Response Value

{
    "sessionId": "{sessionId}",
    "status": 0,
    "value": {
        "browserName": "MicrosoftEdge",
        "browserVersion": "20.10192.0.0",
        "platformName": "windows",
        "platformVersion": "10",
        "takesElementScreenshot": true,
        "takesScreenshot": true,
        "acceptSslCerts": true,
        "pageLoadStrategy": "normal"
    }

}

Set Timeout

NameSet Timeout
DescriptionConfigures the amount of time a particular type of operation can execute before it’s aborted.
SpecJSON Wire Protocol
HTTP RequestPOST /session/{sessionId}/timeouts

JSON Parameters

{
    "type": "{type}",
    "ms": {time}
}

JSON Response Value

{
    "sessionId": "{sessionId}",
    "status": 0,
    "value": null
}