ms.assetid | description | title | author | ms.author | ms.date | ms.topic | ms.prod | keywords |
---|---|---|---|---|---|---|---|---|
84c83d6e-b05c-4dc8-a310-d1977c998e6c |
Learn useful information about session-related commands for the WebDriver API. |
Webdriver commands - Sessions |
erikadoyle |
edoyle |
02/08/2017 |
article |
microsoft-edge |
edge, web development, html, css, javascript, developer |
Microsoft Edge supports the following session-related WebDriver commands:
HTTP Request | Commands |
---|---|
/session | New Session |
/sessions | Sessions |
/session/{sessionId} | Delete Session, Get Capabilities |
/session/{sessionId}/timeouts | Set Timeout |
Name | New Session |
---|---|
Description | Creates a new session. |
Spec | W3C WebDriver |
HTTP Request | POST /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"
}
}
Name | Sessions |
---|---|
Description | Returns a list of the currently active sessions. |
Spec | JSON Wire Protocol |
HTTP Request | GET /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"
}
}
]
}
Name | Delete Session |
---|---|
Description | Deletes the specified session. |
Spec | W3C WebDriver, JSON Wire Protocol |
HTTP Request | DELETE /session/{sessionId} |
JSON Parameters None.
JSON Response Value
{
"sessionId": "{sessionId}",
"status": 0,
"value": null
}
Name | Get Capabilities |
---|---|
Description | Retrieves the capabilities of the specified session. |
Spec | JSON Wire Protocol |
HTTP Request | GET /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"
}
}
Name | Set Timeout |
---|---|
Description | Configures the amount of time a particular type of operation can execute before it's aborted. |
Spec | JSON Wire Protocol |
HTTP Request | POST /session/{sessionId}/timeouts |
JSON Parameters
{
"type": "{type}",
"ms": {time}
}
JSON Response Value
{
"sessionId": "{sessionId}",
"status": 0,
"value": null
}