Selenium Capabilities for Version 3 and Below
Capabilities Reference
Use these capabilities to configure browser, platform, and test metadata for Selenium version 3 and below.
| Key | Values | Capability Description | Default Value | Alias | Value Type | Example | Possible Errors |
|---|---|---|---|---|---|---|---|
browserName |
| This is a mandatory and case-sensitive capability that represents the name of the selected browser. capabilities.setCapability("browserName", "Chrome"); | Mandatory | browser | String | capabilities.setCapability("browserName","chrome"); | Case Sensitive Invalid browser error |
version | Example: 101.0 (Beta) | This capability sets the version of the browser mentioned above. The version you provide as a desired capability must be valid. capabilities.setCapability("version","78.0"); | |||||
latest | - | The latest keyword runs your test cases on the most recent browser version available at TestMu AI. capabilities.setCapability("version","latest"); | |||||
latest-N | latest-5 | This allows you to execute your test on an older browser version. Here, N represents an integer. If you want to test your website on a browser version released 5 versions before the latest one, use the below capability: capabilities.setCapability("version","latest-5"); | |||||
platformName | Supported Windows:
| If you do not declare a platform, TestMu AI maps your test to a relevant operating system for the selected browser. To run Selenium automation testing on Windows 11, add the below line of code in your Desired Selenium Capabilities class: capabilities.setCapability("platformName", "Windows 11"); For macOS Monterey, add the below line: capabilities.setCapability("platformName", "macOS Monterey"); | select on the basis of browser. For web
| platform,OS | String | capabilities.setCapability("platformName", "Windows 10"); | Case Sensitive Invalid Platform Error |
resolution |
String: "1920x1200" | This capability specifies a particular screen resolution for your VM (Virtual Machine). By default, the resolution is 1024x768. capabilities.setCapability("resolution","1600x1200"); | 1920 x1080 | viewport | String | capabilities.setCapability("resolution","1600x1200"); | Case Sensitive Invalid Resolution error |
name | Example: ToDo Sample Test name: "Login testcase" | Represents the name of a test. capabilities.setCapability("name", "ToDo Sample Test"); | test-id | testname,sessionname,test | String | capabilities.setCapability("name", "ToDo Sample Test"); | Case Sensitive > 255 char |
driver_version | Example: "driver_version" : "99.0" | Specifies the driver version of the browser you want to run the test on. Provide a valid driver version corresponding to the browser used. ``` capabilities.setCapability("driver_version","99.0"); | |||||
build | build: "Regression Job #567" Example: 5. | Represents the build number for your test. capabilities.setCapability("build", "5.1"); Note: Build string should be less than 255 characters. | Untitled Build | buildName,job,jobName | String | capabilities.setCapability("build", "5.1"); Note: Build string should be less than 255 characters. | Case Sensitive > 255 char |
projectName | Example: My Test projectName: "Xaviar Project" | Represents the name of a project. capabilities.setCapability("projectName", "Test"); | Untitled | projectName,project | String | caps.setCapability("projectName","Test"); | Case Sensitive > 255 char |
| tags | Example: {"Tag 1", "Tag 2", "Tag 3"} tags: {"Staging", "Critical, "Sanity"} | Groups your automation tests. String[] tags = {"Tags"};caps.setCapability("tags", tags); For more details, visit our documentation. | String | String[] tags = {"Tags"}; caps.setCapability("tags", tags);For more details, visit our documentation. | Case Sensitive > 50 char | ||
buildTags | Example: {"Build Tags"} buildTags: {"Build Tags","Staging"} | Groups your test builds. String[] buildTagList = {"Build Tag"}; caps.setCapability("buildTags", buildTagList); For more details, visit our documentation. | String | String[] buildTagList = {"Build Tag"}; caps.setCapability("buildTags", buildTagList); For more details, visit our documentation. | |||
lambda:loadExtension | Example: https://automation-prod-user-files.s3.amazonaws.com/extensions/orgId-XXXX/2.1.0_0.zip | Tests .zip extension files uploaded on TestMu AI storage. String[] extension = {"https://automation-prod-user-files.s3.amazonaws.com/extensions/orgId-XXXX/2.1.0_0.zip"};capabilities.setCapability("lambda:loadExtension", extension);To upload an extension on TestMu AI storage, refer to our documentation. | |||||
lambda:userFiles | Example:804402.png | Tests the uploaded files on TestMu AI. capabilities.setCapability("lambda:userFiles", file); For more details about uploading files, visit our documentation. | - | ||||
commandLog | Example: true/false | Hides or shows the command logs. capabilities.setCapability("commandLog", false); | FALSE | commandLogs | Boolean | ||
systemLog | Example: true/false | Hides or shows the Selenium/Appium logs. capabilities.setCapability("systemLog", false); | FALSE | seleniumLogs | Boolean | ||
network.http2 | network.http2: true | Enables HTTP2 support in Martian. Use this along with the network capability. | FALSE | Boolean | |||
DisableXFHeaders | DisableXFHeaders:true | Removes the X-Forwarded Headers added by Martian. | FALSE | Boolean | |||
network.debug | network.debug: true | Enables debug logging in Martian. Martian logs every request and response. | FALSE | Boolean | |||
ignoreFfOptionsArgs | ignoreFfOptionsArgs:true | Ignores args in moz:firefoxOptions. | FALSE | Boolean | |||
updateBuildStatusOnSuccess | true/false | Updates build status on replication of test name. | FALSE | Boolean |
