Skip to main content

Selenium Capabilities for version <= 3

KeyValuesCapability DescriptionDefault ValueAliasValue TypeExamplePossible Errors
browserName
  • Chrome
  • Firefox
  • Safari
  • MS Edge – Microsoft Edge
  • Opera
  • IE – Internet Explorer
This is a mandatory & case-sensitive capability, which 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 is for the version of the browser mentioned above. This version you provide as a desired capability needs to be a valid one.
capabilities.setCapability("version","78.0");
latestThe latest keyword will help you run your test cases over the most recent browser version available at LambdaTest.
capabilities.setCapability("version","latest");
latest-Nlatest-5This would allow you to execute your test over an older browser version. Here, N represents an integer. So if you wish to test your website over a browser version, which was released 5 versions before the latest one. You can do so using 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 a platform for testing is not declared then LambdaTest will map your test to a relevant operating system for the selected browser.
So, if you wish to perform Selenium automation testing of your web application on Windows 11 then you need to mention the below line of code in your Desired Selenium Capabilities class.
capabilities.setCapability("platformName", "Windows 11");
Similarly, for macOS, if you wish to perform Selenium automation testing of your web application on macOS Monterey, then you need to mention the below line of code in your Desired Selenium Capabilities class.
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
  • 1024×768
  • 1280×800
  • 1280×1024
  • 1366×768
  • 1440×900
  • 1680×1050
  • 1600×1200
  • 1920×1200
  • 1920×1080
  • 2048×1536
These values are OS Dependent, Verify from Capability generator
String: "1920x1200"
This capability would help you to specify a particular screen resolution for your VM(Virtual Machine). By default, the resolution would be 1024×768.
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"Used to specify the driver version of the browser you want to run the test on. Make sure to provide a valid driver version corresponding to the browser used.
``` capabilities.setCapability("driver_version","99.0");
buildbuild: "Regression Job #567"
Example: 5.
Represent the build number for your test.
capabilities.setCapability("build", "5.1");
Note: Build string should be less than 255 character
Untitled BuildbuildName,job,jobNameStringcapabilities.setCapability("build", "5.1");
Note: Build string should be less than 255 character
Case Sensitive > 255 char
projectNameExample: My Test
projectName: "Xaviar Project"
Represent 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"}
Allows to group 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"}
Allows to group your tests 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.zipAllows to test .zip extension files uploaded on LambdaTest 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 extension on LambdaTest storage, refer to our documentation.
lambda:userFilesExample:804402.pngAllows to test the uploaded files on LambdaTest.
capabilities.setCapability("lambda:userFiles", file);
For more details about uploading files, visit our documentation.
-
commandLogExample: true/falseAllows to hide the command logs.
capabilities.setCapability("commandLog", false);
FALSEcommandLogsBoolean
systemLogExample: true/falseAllows to hide the Selenium/Appium logs.
capabilities.setCapability("systemLog", false);
FALSEseleniumLogsBoolean
network.http2network.http2: trueThis enables HTTP2 Support in Martian and has to be used along with network capability.FALSEBoolean
DisableXFHeadersDisableXFHeaders:trueThis removes the X-Fowarded Headers added by Martian.FALSEBoolean
network.debugnetwork.debug: trueThis enables Debug Logging in Martian. Martian will log every request and response.FALSEBoolean
ignoreFfOptionsArgsignoreFfOptionsArgs:trueTo ignore args in moz:firefoxOptions.FALSEBoolean
updateBuildStatusOnSuccesstrue/falseTo update build Status on replication of test nameFALSEBoolean

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

Book Demo

Help and Support

Related Articles