Skip to main content

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.

KeyValuesCapability DescriptionDefault ValueAliasValue TypeExamplePossible Errors
browserName
  • Chrome
  • Firefox
  • Safari
  • MS Edge - Microsoft Edge
  • Opera
  • IE - Internet Explorer
This is a mandatory and case-sensitive capability that represents the name of the selected browser.
capabilities.setCapability("browserName", "Chrome");
MandatorybrowserStringcapabilities.setCapability("browserName","chrome");Case Sensitive
Invalid browser error
versionExample: 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-Nlatest-5This 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");
platformNameSupported Windows:
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Windows 8
  • Windows 7
Supported macOS:
  • Monterey
  • Big Sur
  • Catalina
  • Mojave
  • High Sierra
  • Sierra
  • El Capitan
  • Mavericks
  • Yosemite
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
  1. Linux
  2. win10
platform,OSStringcapabilities.setCapability("platformName", "Windows 10");Case Sensitive
Invalid Platform Error
resolution
  • 1024x768
  • 1280x800
  • 1280x1024
  • 1366x768
  • 1440x900
  • 1680x1050
  • 1600x1200
  • 1920x1200
  • 1920x1080
  • 2048x1536
These values are OS Dependent, Verify from Capability generator
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 x1080viewportStringcapabilities.setCapability("resolution","1600x1200");Case Sensitive
Invalid Resolution error
nameExample: ToDo Sample Test
name: "Login testcase"
Represents the name of a test.
capabilities.setCapability("name", "ToDo Sample Test");
test-idtestname,sessionname,testStringcapabilities.setCapability("name", "ToDo Sample Test");Case Sensitive > 255 char
driver_versionExample: "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");
buildbuild: "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 BuildbuildName,job,jobNameStringcapabilities.setCapability("build", "5.1");
Note: Build string should be less than 255 characters.
Case Sensitive > 255 char
projectNameExample: My Test
projectName: "Xaviar Project"
Represents the name of a project.
capabilities.setCapability("projectName", "Test");
UntitledprojectName,projectStringcaps.setCapability("projectName","Test");Case Sensitive > 255 char
tagsExample: {"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.
StringString[] tags = {"Tags"};
caps.setCapability("tags", tags);
For more details, visit our documentation.
Case Sensitive > 50 char
buildTagsExample: {"Build Tags"}
buildTags: {"Build Tags","Staging"}
Groups your test builds.
String[] buildTagList = {"Build Tag"};
caps.setCapability("buildTags", buildTagList);
For more details, visit our documentation.
StringString[] buildTagList = {"Build Tag"};
caps.setCapability("buildTags", buildTagList);
For more details, visit our documentation.
lambda:loadExtensionExample: https://automation-prod-user-files.s3.amazonaws.com/extensions/orgId-XXXX/2.1.0_0.zipTests .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:userFilesExample:804402.pngTests the uploaded files on TestMu AI.
capabilities.setCapability("lambda:userFiles", file);
For more details about uploading files, visit our documentation.
-
commandLogExample: true/falseHides or shows the command logs.
capabilities.setCapability("commandLog", false);
FALSEcommandLogsBoolean
systemLogExample: true/falseHides or shows the Selenium/Appium logs.
capabilities.setCapability("systemLog", false);
FALSEseleniumLogsBoolean
network.http2network.http2: trueEnables HTTP2 support in Martian. Use this along with the network capability.FALSEBoolean
DisableXFHeadersDisableXFHeaders:trueRemoves the X-Forwarded Headers added by Martian.FALSEBoolean
network.debugnetwork.debug: trueEnables debug logging in Martian. Martian logs every request and response.FALSEBoolean
ignoreFfOptionsArgsignoreFfOptionsArgs:trueIgnores args in moz:firefoxOptions.FALSEBoolean
updateBuildStatusOnSuccesstrue/falseUpdates build status on replication of test name.FALSEBoolean

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles