Selenium Capabilities for Version 4 and Above
In addition to the capabilities supported in Selenium version 3, Selenium version 4 introduces the following new capabilities.
Capabilities Reference
Use these capabilities to configure authentication, browser version, platform, and session settings for Selenium 4.
| Key | Values | Capability Description | Default Value | Alias | Value Type | Example | Possible Errors |
|---|---|---|---|---|---|---|---|
user | user: "Username" Example: YOUR_LAMBDATEST_USERNAME | Find this under your TestMu AI profile. If you are already logged into TestMu AI, the Desired Selenium Capabilities Generator automatically fetches your TestMu AI username under the desired Selenium capabilities class. capabilities.setCapability("user","YOUR_LAMBDATEST_USERNAME"); | Mandatory | username | String | If you are already logged into TestMu AI then the Desired Selenium Capabilities Generator automatically fetches your TestMu AI username under the desired Selenium capabilities class. capabilities.setCapability("user","YOUR_LAMBDATEST_USERNAME"); | 401 Unauthorized case sensitive |
accessKey | accessKey: "Access Key" Example: YOUR_LAMBDATEST_ACCESS_KEY | Find this under your TestMu AI profile. If you are already logged into TestMu AI, the Desired Selenium Capabilities Generator automatically fetches your TestMu AI Access Key under the desired Selenium capabilities class. capabilities.setCapability("accessKey","YOUR_LAMBDATEST_ACCESS_KEY"); | Mandatory | key | String | capabilities.setCapability(""accessKey"",""YOUR_LAMBDATEST_ACCESS_KEY""); | 401 Unauthorized case sensitive |
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"); | Dynamic map by system | driverVersion,driver | String | ||
browserVersion | Ex: 101.0 (Beta) | Declares the specific browser version on which you want your test automation scripts to run using the Selenium Automation Grid. Provide a valid browser version in your desired Selenium capabilities class. capabilities.setCapability("browserVersion","79.0");You can use "latest", "latest-1" and so on to select the 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 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 older browser versions. Here, N represents an integer. To test your website on the 5 most recently released browser versions, use the below capability: capabilities.setCapability("version","latest-5"); | |||||
platformName | Supported Windows:
| Specifies the platform on which you want to run your Selenium automation testing. 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 based on browser.
| platform,OS | String | capabilities.setCapability("platformName", "Windows 10"); | Case Sensitive Invalid Platform Error |
| selenium_version | Example: "selenium_version", "4.0.0" | Defines the Selenium version for the test session. | Dynamic map by system | seleniumVersion,seVersion | String | ||
| idleTimeout | - | Defines the idle timeout for the session. | 600 sec | idle |
