Skip to main content

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

NameTypeMandatoryDescription
browserNameStringNoName of the browser
browserVersionStringNoVersion of the browser
osStringNoOperating 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

NameTypeMandatoryDescription
browserNameStringnoBrowser name
Available values: chrome, firefox, safari, MicrosoftEdge.
browserVersionStringnoBrowser version
osNameStringnoOperating system to run the browser on, case sensitive.

For example: Mac OS X Catalina, Windows 10, Mac OS Big Sur
testNameStringYesName of the manual test
testStepsArrayYesAn array of objects describing the manual test steps
nameStringYesName of the manual test step (max 255 characters)
descriptionStringNoThe step description
expectedResultStringNoExpected result of the step
attachmentStringNoLink with the additional related information

JSON Response Properties

NameTypeMandatoryDescription
data.linkStringYesLink for opening the selenium manual session in browser.
data.report_api_idStringYesThe 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"
}