Selenium Capabilities for version >= 4
In addition to the capabilities supported in selenium version 3, there are some new capabilities that are introduced in theSelenium version >= 4.
Key | Values | Capability Description | Default Value | Alias | Value Type | Example | Possible Errors |
---|---|---|---|---|---|---|---|
user | user: "Username" Example: harshitp | Can be found under your LambdaTest profile. If you are already logged into LambdaTest, then the Desired Selenium Capabilities Generator will automatically fetch your LambdaTest username under the desired Selenium capabilities class. capabilities.setCapability("user","harshitp"); | Mandatory | username | String | If you are already logged into LambdaTest then the Desired Selenium Capabilities Generator will automatically fetch your LambdaTest username under the desired Selenium capabilities class. capabilities.setCapability("user","harshitp"); | 401 Unauthorized case sensitive |
accessKey | accessKey: "Access Key" Example: 123ABC | Can be found under your LambdaTest profile. If you are already logged into LambdaTest, then the Desired Selenium Capabilities Generator will automatically fetch your LambdaTest Access Key under the desired Selenium capabilities class. capabilities.setCapability("accessKey","123ABC"); | Mandatory | key | String | capabilities.setCapability(""accessKey"",""123ABC""); | 401 Unauthorized case sensitive |
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"); | Dynamic map by system | driverVersion,driver | String | ||
browserVersion | Ex: 101.0 (Beta) | This capability is used to declare the specific browser version on which you want your test automation scripts to be executed using our Selenium Automation Grid. Make sure to provide a valid browser version in your desired Selenium capabilities class. capabilities.setCapability("browserVersion","79.0"); You can use "latest", "lates-1" and so-on to select latest browser version | latest | version | String | capabilities.setCapability("browserVersion","91.0"); capabilities.setCapability("browserVersion","latest"); capabilities.setCapability("browserVersion","latest-1"); | Case Sensitive Invalid version error |
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 the older browser versions. Here, N represents an integer. So if you wish to test your website over the 5 most recently released browser versions. You can do so using the below capability: capabilities.setCapability("version","latest-5"); | |||||
platformName | Supported Windows:
| This capability is used to specify the platform on which you wish to run your Selenium automation testing. 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 Capabilities class. capabilities.setCapability("platformName", "macOS Monterey"); | Select based on browser.
| platform,OS | String | capabilities.setCapability("platformName", "Windows 10"); | Case Sensitive Invalid Platform Error |
selenium_version | Example: "selenium_version", "4.0.0" | To define Selenium version for test session. | Dynamic map by system | seleniumVersion,seVersion | String | ||
idleTimeout | - | To define idle Timeout. | 600 sec | idle |