Skip to content

Files

Latest commit

 

History

History
62 lines (60 loc) · 8.62 KB

selenium-three-capabilities.md

File metadata and controls

62 lines (60 loc) · 8.62 KB
id title hide_title sidebar_label description keywords url site_name slug
selenium-three-capabilities
Selenium Capabilities for version <= 3
false
Selenium Capabilities v3
This document list down all the desired capabilities that are supported by LambdaTest for Selenium version 3 and less
lambdatest automation
selenium capabilities
selenium version <=3
LambdaTest
selenium-three-capabilities/
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify({ "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "LambdaTest", "item": "https://www.lambdatest.com" },{ "@type": "ListItem", "position": 2, "name": "Selenium Capabilities", "item": "https://www.lambdatest.com/support/docs/" },{ "@type": "ListItem", "position": 3, "name": "Selenium Capabilities v3", "item": "https://www.lambdatest.com/support/docs/selenium-three-capabilities/" }] }) }} ></script>
Key Values Capability Description Default Value Alias Value Type Example Possible 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");
Mandatory browser String capabilities.setCapability("browserName","chrome"); Case Sensitive
Invalid browser error
version Example: 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");
latest The latest keyword will help you run your test cases over the most recent browser version available at LambdaTest.
capabilities.setCapability("version","latest");
latest-N latest-5 This 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");
platformName Supported 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,OS String capabilities.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 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" 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");
build build: "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 Build buildName,job,jobName String capabilities.setCapability("build", "5.1");
Note: Build string should be less than 255 character
Case Sensitive > 255 char
projectName Example: My Test
projectName: "Xaviar Project"
Represent 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"}
Allows to group 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"}
Allows to group your tests 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 Allows 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:userFiles Example:804402.png Allows to test the uploaded files on LambdaTest.
capabilities.setCapability("lambda:userFiles", file);
For more details about uploading files, visit our documentation.
-
commandLog Example: true/false Allows to hide the command logs.
capabilities.setCapability("commandLog", false);
FALSE commandLogs Boolean
systemLog Example: true/false Allows to hide the Selenium/Appium logs.
capabilities.setCapability("systemLog", false);
FALSE seleniumLogs Boolean
network.http2 network.http2: true This enables HTTP2 Support in Martian and has to be used along with network capability. FALSE Boolean
DisableXFHeaders DisableXFHeaders:true This removes the X-Fowarded Headers added by Martian. FALSE Boolean
network.debug network.debug: true This enables Debug Logging in Martian. Martian will log every request and response. FALSE Boolean
ignoreFfOptionsArgs ignoreFfOptionsArgs:true To ignore args in moz:firefoxOptions. FALSE Boolean
updateBuildStatusOnSuccess true/false To update build Status on replication of test name FALSE Boolean