Selenium REST API
Digital.ai Continuous Testing allows users to manage browsers using Rest API. This page describes supported REST API for managing browsers.
info
- The role of the user performing the Rest Operation is specified by the 'Authorization' header.
- For more information, see How To Execute Rest API.
Get All Browsers
Get all the browsers.
GET /api/v1/browsers
Get Browsers Response Expand source
{
"status" : "SUCCESS",
"data" : [ {
"browserName" : "MicrosoftEdge",
"browserVersion" : "83.0.478.25",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
}, {
"browserName" : "MicrosoftEdge",
"browserVersion" : "81.0.416.68",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
}, {
"browserName" : "chrome",
"browserVersion" : "81.0.4044.129",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
}, {
"browserName" : "chrome",
"browserVersion" : "80.0.3987.163",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
}, {
"browserName" : "firefox",
"browserVersion" : "76.0b8",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
}, {
"browserName" : "firefox",
"browserVersion" : "75.0",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
}, {
"browserName" : "MicrosoftEdge",
"browserVersion" : "18363",
"platform" : "WIN10",
"osName" : "Windows 10",
"agentName" : "Bloop",
"region" : "Master"
} ],
"code" : "OK"
}
Start Web Control
Start a web session for the browser
PUT /api/v1/browsers/web-control
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
browserName | String | No | Name of the browser |
browserVersion | String | No | Version of the browser |
os | String | No | Operating system to run the browser on, case sensitive. For example: Mac OS X Catalina, Windows 10, Mac OS Big Sur |
Get Browsers Response Expand source
{
"regularLink": "https://[REGION_HOST]/selenium-3624315/#/DZ-Tm2P1uPCAcIEgl8fGzw"
}
Start Web Control With Template for Manual Tests
Start a web session for the browser
POST /api/v1/browsers/web-control
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
browserName | String | no | Browser name Available values: chrome, firefox, safari, MicrosoftEdge. |
browserVersion | String | no | Browser version |
osName | String | no | Operating system to run the browser on, case sensitive. For example: Mac OS X Catalina, Windows 10, Mac OS Big Sur |
testName | String | Yes | Name of the manual test |
testSteps | Array | Yes | An array of objects describing the manual test steps |
name | String | Yes | Name of the manual test step (max 255 characters) |
description | String | No | The step description |
expectedResult | String | No | Expected result of the step |
attachment | String | No | Link with the additional related information |
JSON Response Properties
Name | Type | Mandatory | Description |
---|---|---|---|
data.link | String | Yes | Link for opening the selenium manual session in browser. |
data.report_api_id | String | Yes | The assigned Identifier for this manual test, can be used for retrieving the details from Reporter. |
Request Example Expand source
{
"browserName": "chrome",
"browserVersion": "95",
"osName": "Mac OS Big Sur",
"testName": "Selenium test",
"testSteps": [
{
"name": "Step 1",
"description": "Step 1 description",
"expectedResult": "What should happen in step 1",
"attachment": "https://www.example.com/example/example/example"
},
{
"name": "Step 2",
"description": "Step 2 description",
"expectedResult": "What should happen in step 2"
},
{
"name": "Step 3",
"description": "Step 3 description",
"expectedResult": "What should happen in step 3",
"attachment": "https://www.google.com/example/example/example.jpg"
}
]
}
Browsers Response Example Expand source
{
"status": "SUCCESS",
"data": {
"link": "http://[REGION_HOST]/#/rC2BKyU2GG_3L8VXpmU5yg",
"report_api_id": "0e541a10-e83e-4bd0-9e86-f96af34ab5ba"
},
"code": "OK"
}