Skip to main content

Desired Capabilities In Selenium


LambdaTest Desired Selenium Capabilities Generator autogenerates the capabilities class needed to run your Selenium and Appium automation testing scripts on LambdaTest Selenium Grid. The Selenium capabilities generator will provide you with the entire code of capabilities class based on your mouse-interactions from the UI. Also, you will get the code for your selected configurations in all of the six programming languages i.e. Java, PHP, Ruby, JavaScript, C#, and Python.

This document will teach you how to leverage LambdaTest Capability Generator to easily for declaring desired capabilities in selenium for both desktop and mobile browsers.

In this document, we will talk about the following:

  • Desired Capabilities in Selenium
  • Desired Capabilities in Selenium 4
  • Appium Capabilities
  • Selenium testing from Different Countries
  • LambdaTest Advanced Selenium Capabilities
  • Lighthouse Performance
  • Network Throttling
  • Headless Browser Testing
  • Default Selenium Capabilities
  • Hide/Mask Sensitive Information Through Selenium Capabilities

The values provided for any capability are both space-insensitive and case-insensitive. This means that any value you provide as Mac OS X 10.13 or mac os x 10.13 would be correct.

Selenium Capabilities


KEYVALUESCAPABILITYDEFAULT VALUEALIASCAPABILITY DESCRIPTIONVALUE 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");
MandatorybrowserName of BrowserStringcapabilities.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,OSName of 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 x1080viewportResolution of Machine, Works only in desktopsStringcapabilities.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,testName of your 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,jobNameYou can group your tests like a job containing multiple testsStringcapabilities.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,projectYou can group your builds like a project containing multiple jobsStringcaps.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.
To add labels on tests to group tests among buildsStringString[] 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.
To add labels on builds to group buildsStringString[] 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);
FALSEcommandLogsTo hide command logsBoolean
systemLogExample: true/falseAllows to hide the Selenium/Appium logs.
capabilities.setCapability("systemLog", false);
FALSEseleniumLogsTo hide selenium/appium logsBoolean
network.http2network.http2: trueThis enables HTTP2 Support in Martian and has to be used along with network capability.FALSEThis enables HTTP2 Support in Martian and has to be used along with network capability.Boolean
DisableXFHeadersDisableXFHeaders:trueThis removes the X-Fowarded Headers added by Martian.FALSEThis removes the X-Fowarded Headers added by Martian.Boolean
network.debugnetwork.debug: trueThis enables Debug Logging in Martian. Martian will log every request and response.FALSEThis enables Debug Logging in Martian. Martian will log every request and response.Boolean
ignoreFfOptionsArgsignoreFfOptionsArgs:trueTo ignore args in moz:firefoxOptions.FALSETo ignore args in moz:firefoxOptions.Boolean
updateBuildStatusOnSuccesstrue/falseTo update build Status on replication of test nameFALSETo update build Status on replication of test nameBoolean

Desired Capabilities in Selenium 4


We have introduced a new tab for desired Capabilities in Selenium 4 in our Desired Capabilities Generator. With respect to Selenium 4, there a few changes to observe while declaring the Desired Selenium Capabilities class.

Image

Here is a table to represent the capabilities that have been updated or newly introduced for Selenium 4.

KEYVALUESCAPABILITYDEFAULT VALUEALIASCAPABILITY DESCRIPTIONVALUE TYPEEXAMPLEPOSSIBLE ERRORS
useruser: "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");
MandatoryusernameYour LT UsernameStringIf 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
accessKeyaccessKey: "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");
MandatorykeyYour LT access keyStringcapabilities.setCapability(""accessKey"",""123ABC"");401
Unauthorized
case sensitive
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");
Dynamic map by systemdriverVersion,driverTo define driver version for test sessionString
browserVersionEx: 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
latestversionBrowser VersionStringcapabilities.setCapability("browserVersion","91.0");
capabilities.setCapability("browserVersion","latest");
capabilities.setCapability("browserVersion","latest-1");
Case Sensitive
Invalid version error
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 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");
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
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.
  • Linux
  • Windows 10
platform,OSName of OSStringcapabilities.setCapability("platformName", "Windows 10");Case Sensitive
Invalid Platform Error
selenium_versionExample: "selenium_version", "4.0.0"To define Selenium version for test session.Dynamic map by systemseleniumVersion,seVersionTo define selenium version for test sessionString
idleTimeout-To define idle Timeout.600 secidle

Desired Capability to Automate IE Mode in Microsoft Edge


LambdaTest's Automation allows you to automate IE Mode in Microsoft Edge on Windows 11. You can pass the below desired capability in your test script and execute your tests.

InternetExplorerOptions browserOptions = new InternetExplorerOptions();
browserOptions.setPlatformName("Windows 11");
browserOptions.setBrowserVersion("11.0");
HashMap<String, Object> ltOptions = new HashMap<String, Object>();
ltOptions.put("username", "Your LambdaTest Username");
ltOptions.put("accessKey", "Your LambdaTest Access Key");
ltOptions.put("project", "Untitled");
ltOptions.put("w3c", true);
browserOptions.setCapability("LT:Options", ltOptions);

Setting Browser Options


Selenium lets you set browser arguments for Chromium based browsers. When selecting Chrome, Firefox, and Edge, you can set browser options using ChromeOptions, EdgeOptions, and FirefoxOptions capability as shown below.

For Chrome:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class ChromeTest {
public static void main(String[] args) {
ChromeOptions options = new ChromeOptions();
// Set Chrome capabilities
options.addArguments("--headless");

WebDriver driver = new ChromeDriver(options);
driver.get("http://example.com");
// Your test code here
driver.quit();
}
}

For Firefox:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;

public class FirefoxTest {
public static void main(String[] args) {
FirefoxOptions options = new FirefoxOptions();
// Set Firefox capabilities
options.addArguments("--headless");

WebDriver driver = new FirefoxDriver(options);
driver.get("http://example.com");
// Your test code here
driver.quit();
}
}

For Edge:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;

public class EdgeTest {
public static void main(String[] args) {
EdgeOptions options = new EdgeOptions();
// Set Edge capabilities
options.addArguments("--headless");

WebDriver driver = new EdgeDriver(options);
driver.get("http://example.com");
// Your test code here
driver.quit();
}
}

Appium Capabilities


We have come up with a new tab for Appium in our Desired Capabilities Generator. Here are the unique capabilities that you may have to keep in mind while executing Appium tests using LambdaTest Selenium Grid.

KEYVALUESCAPABILITYDEFAULT VALUE
deviceNameExample:
  • Galaxy S10
  • iPhone XS
This capability allows you to specify the particular device on which you wish to run your Appium automation testing.
capabilities.setCapability("deviceName", "Galaxy S10");
Similarly for iPhone XS, the capability would be as follow.
capabilities.setCapability("deviceName", "iPhone XS");
Mandatory
platformVersionExample:
  • Android 9.0
  • iOS 12.1
This capability allows you to specify the particular Android OS version or iOS version, for which you wish to run your Appium automation testing.
In case you wish to run your tests on Android version 9.0, then you will get the below capability for Java from our capability generator.
capabilities.setCapability("platformVersion","9.0");
Similarly if you wish to run for iOS version 12.1, you may get the below capability from our Desired capabilities generator.
capabilities.setCapability("platformVersion","12.1");

To check the entire list of devices available, along with operating systems for different desktop and mobile browsers, visit our list of browsers.

Selenium Automation Testing From Different GeoLocations


We have come up with a new Capability drop down that would allow you to run your test from different geographies across the world.

KEYVALUESCAPABILITYDEFAULT VALUEALIASCAPABILITY DESCRIPTIONVALUE TYPEEXAMPLEPOSSIBLE ERRORS
geoLocationExample: USThis capability helps you to perform Selenium automation testing from different countries.
capabilities.setCapability("geoLocation","US");
geoTest from Different countriesStringcapabilities.setCapability("geoLocation","US");Case Sensitive
Invalid location error

This capability helps you to perform Selenium automation testing from different countries.

You can perform Selenium automation testing from the below-listed countries.

COUNTRYCOUNTRY CODES
Albania"AL"
Andorra"AD"
Argentina"AR"
Armenia"AM"
Australia"AU"
Austria"AT"
Azerbaijan"AZ"
Bahrain"BH"
Bangladesh"BD"
Belarus"BY"
Belgium"BE"
Bosnia and Herzegovina"BA"
Brazil"BR"
Bulgaria"BG"
Cambodia"KH"
Canada"CA"
Chile"CL"
China"CN"
Colombia"CO"
Costa Rica"CR"
Croatia"HR"
Curacao"CW"
Cyprus"CY"
Czech Republic"CZ"
Denmark"DK"
Dominican Republic"DO"
Ecuador"EC"
Egypt"EG"
El Salvador"SV"
Estonia"EE"
Finland"FI"
France"FR"
Georgia"GE"
Germany"DE"
Greece"GR"
Guatemala"GT"
Honduras"HN"
Hong Kong"HK"
Hungary"HU"
Iceland"IS"
India"IN"
Indonesia"ID"
Ireland"IE"
Isle of Man"IM"
Israel"IL"
Italy"IT"
Jamaica"JM"
Japan"JP"
Jordan"JO"
Kazakhstan"KZ"
Kenya"KE"
Korea"KR"
Kuwait"KW"
Kyrgyzstan"KG"
Latvia"LV"
Lebanon"LB"
Lithuania"LT"
Luxembourg"LU"
Malaysia"MY"
Malta"MT"
Mexico"MX"
Moldova"MD"
Mongolia"MN"
Morocco"MA"
Netherlands"NL"
New Zealand"NZ"
Nicaragua"NI"
Nigeria"NG"
Norway"NO"
Oman"OM"
Pakistan"PK"
Panama"PA"
Paraguay"PY"
Peru"PE"
Philippines"PH"
Poland"PL"
Portugal"PT"
Puerto Rico"PR"
Qatar"QA"
Romania"RO"
Russian Federation"RU"
Saudi Arabia"SA"
Serbia"RS"
Singapore"SG"
Slovakia"SK"
Slovenia"SI"
South Africa"ZA"
Spain"ES"
Sweden"SE"
Switzerland"CH"
Taiwan"TW"
Tanzania"TZ"
Thailand"TH"
Tunisia"TN"
Turkey"TR"
Ukraine"UA"
United Arab Emirates"AE"
United Kingdom"GB"
United States"US"
Uruguay"UY"
Uzbekistan"UZ"
Venezuela"VE"
Vietnam"VN"

Important Note: You cannot perform Geolocation testing with locally hosted web applications using LambdaTest Tunnel in a single test case. If you wish to perform both, then you can leverage parallel testing to run two tests simultaneously, one for Geolocation and the other for LambdaTest Tunnel.

List of Supported Timezones


Following are the list of supported Timezones for automation testing on the LambdaTest platform.

CityTimezone
AbidjanGreenwich Standard Time,
AccraGreenwich Standard Time,
Addis_AbabaE. Africa Standard Time,
AlgiersW. Central Africa Standard Time,
Asmaranan,
BamakoGreenwich Standard Time,
BanguiW. Central Africa Standard Time,
BanjulGreenwich Standard Time,
BissauGreenwich Standard Time,
BlantyreSouth Africa Standard Time,
BrazzavilleW. Central Africa Standard Time,
BujumburaSouth Africa Standard Time,
CairoEgypt Standard Time,
CasablancaMorocco Standard Time,
CeutaRomance Standard Time,
ConakryGreenwich Standard Time,
DakarGreenwich Standard Time,
Dar_es_SalaamE. Africa Standard Time,
DjiboutiE. Africa Standard Time,
DoualaW. Central Africa Standard Time,
El_AaiunMorocco Standard Time,
FreetownGreenwich Standard Time,
GaboroneSouth Africa Standard Time,
HarareSouth Africa Standard Time,
JohannesburgSouth Africa Standard Time,
JubaE. Africa Standard Time,
KampalaE. Africa Standard Time,
KhartoumE. Africa Standard Time,
KigaliSouth Africa Standard Time,
KinshasaW. Central Africa Standard Time,
LagosW. Central Africa Standard Time,
LibrevilleW. Central Africa Standard Time,
LomeGreenwich Standard Time,
LuandaW. Central Africa Standard Time,
LubumbashiSouth Africa Standard Time,
LusakaSouth Africa Standard Time,
MalaboW. Central Africa Standard Time,
MaputoSouth Africa Standard Time,
MaseruSouth Africa Standard Time,
MbabaneSouth Africa Standard Time,
MogadishuE. Africa Standard Time,
MonroviaGreenwich Standard Time,
NairobiE. Africa Standard Time,
NdjamenaW. Central Africa Standard Time,
NiameyW. Central Africa Standard Time,
NouakchottGreenwich Standard Time,
OuagadougouGreenwich Standard Time,
Porto-NovoW. Central Africa Standard Time,
Sao_TomeGreenwich Standard Time,
TripoliLibya Standard Time,
TunisW. Central Africa Standard Time,
WindhoekNamibia Standard Time,
Adaknan,
AnchorageAlaskan Standard Time,
AnguillaSA Western Standard Time,
AntiguaSA Western Standard Time,
AraguainaSA Eastern Standard Time,
Buenos_Airesnan,
Catamarcanan,
Cordobanan,
Jujuynan,
La_RiojaArgentina Standard Time,
Mendozanan,
Rio_GallegosArgentina Standard Time,
SaltaArgentina Standard Time,
San_JuanArgentina Standard Time,
San_LuisArgentina Standard Time,
TucumanArgentina Standard Time,
UshuaiaArgentina Standard Time,
ArubaSA Western Standard Time,
AsuncionParaguay Standard Time,
Atikokannan,
BahiaBahia Standard Time,
Bahia_BanderasCentral Standard Time (Mexico),
BarbadosSA Western Standard Time,
BelemSA Eastern Standard Time,
BelizeCentral America Standard Time,
Blanc-SablonSA Western Standard Time,
Boa_VistaSA Western Standard Time,
BogotaSA Pacific Standard Time,
BoiseMountain Standard Time,
Cambridge_BayMountain Standard Time,
Campo_GrandeCentral Brazilian Standard Time,
CancunEastern Standard Time (Mexico),
CaracasVenezuela Standard Time,
CayenneSA Eastern Standard Time,
CaymanSA Pacific Standard Time,
ChicagoCentral Standard Time,
ChihuahuaMountain Standard Time (Mexico),
Costa_RicaCentral America Standard Time,
CrestonUS Mountain Standard Time,
CuiabaCentral Brazilian Standard Time,
CuracaoSA Western Standard Time,
DanmarkshavnUTC,
DawsonPacific Standard Time,
Dawson_CreekUS Mountain Standard Time,
DenverMountain Standard Time,
DetroitEastern Standard Time,
DominicaSA Western Standard Time,
EdmontonMountain Standard Time,
EirunepeSA Pacific Standard Time,
El_SalvadorCentral America Standard Time,
FortalezaSA Eastern Standard Time,
Glace_BayAtlantic Standard Time,
GodthabGreenland Standard Time,
Goose_BayAtlantic Standard Time,
Grand_TurkSA Western Standard Time,
GrenadaSA Western Standard Time,
GuadeloupeSA Western Standard Time,
GuatemalaCentral America Standard Time,
GuayaquilSA Pacific Standard Time,
GuyanaSA Western Standard Time,
HalifaxAtlantic Standard Time,
HavanaEastern Standard Time,
HermosilloUS Mountain Standard Time,
Indianapolisnan,
KnoxCentral Standard Time,
MarengoUS Eastern Standard Time,
PetersburgEastern Standard Time,
Tell_CityCentral Standard Time,
VevayUS Eastern Standard Time,
VincennesEastern Standard Time,
WinamacEastern Standard Time,
InuvikMountain Standard Time,
IqaluitEastern Standard Time,
JamaicaSA Pacific Standard Time,
JuneauAlaskan Standard Time,
Louisvillenan,
MonticelloEastern Standard Time,
KralendijkSA Western Standard Time,
La_PazSA Western Standard Time,
LimaSA Pacific Standard Time,
Los_AngelesPacific Standard Time,
Lower_PrincesSA Western Standard Time,
MaceioSA Eastern Standard Time,
ManaguaCentral America Standard Time,
ManausSA Western Standard Time,
MarigotSA Western Standard Time,
MartiniqueSA Western Standard Time,
MatamorosCentral Standard Time,
MazatlanMountain Standard Time (Mexico),
MenomineeCentral Standard Time,
MeridaCentral Standard Time (Mexico),
Metlakatlanan,
Mexico_CityCentral Standard Time (Mexico),
Miquelonnan,
MonctonAtlantic Standard Time,
MonterreyCentral Standard Time (Mexico),
MontevideoMontevideo Standard Time,
MontrealEastern Standard Time,
MontserratSA Western Standard Time,
NassauEastern Standard Time,
New_YorkEastern Standard Time,
NipigonEastern Standard Time,
NomeAlaskan Standard Time,
NoronhaUTC-02,
BeulahCentral Standard Time,
CenterCentral Standard Time,
New_SalemCentral Standard Time,
OjinagaMountain Standard Time,
PanamaSA Pacific Standard Time,
PangnirtungEastern Standard Time,
ParamariboSA Eastern Standard Time,
PhoenixUS Mountain Standard Time,
Port-au-PrinceEastern Standard Time,
Port_of_SpainSA Western Standard Time,
Porto_VelhoSA Western Standard Time,
Puerto_RicoSA Western Standard Time,
Rainy_RiverCentral Standard Time,
Rankin_InletCentral Standard Time,
RecifeSA Eastern Standard Time,
ReginaCanada Central Standard Time,
ResoluteCentral Standard Time,
Rio_BrancoSA Pacific Standard Time,
Santa_IsabelPacific Standard Time (Mexico),
SantaremSA Eastern Standard Time,
SantiagoPacific SA Standard Time,
Santo_DomingoSA Western Standard Time,
Sao_PauloE. South America Standard Time,
ScoresbysundAzores Standard Time,
Shiprocknan,
SitkaAlaskan Standard Time,
St_BarthelemySA Western Standard Time,
St_JohnsNewfoundland Standard Time,
St_KittsSA Western Standard Time,
St_LuciaSA Western Standard Time,
St_ThomasSA Western Standard Time,
St_VincentSA Western Standard Time,
Swift_CurrentCanada Central Standard Time,
TegucigalpaCentral America Standard Time,
ThuleAtlantic Standard Time,
Thunder_BayEastern Standard Time,
TijuanaPacific Standard Time,
TorontoEastern Standard Time,
TortolaSA Western Standard Time,
VancouverPacific Standard Time,
WhitehorsePacific Standard Time,
WinnipegCentral Standard Time,
YakutatAlaskan Standard Time,
YellowknifeMountain Standard Time,
CaseyW. Australia Standard Time,
DavisSE Asia Standard Time,
DumontDUrvilleWest Pacific Standard Time,
MacquarieCentral Pacific Standard Time,
MawsonWest Asia Standard Time,
McMurdoNew Zealand Standard Time,
PalmerPacific SA Standard Time,
RotheraSA Eastern Standard Time,
South_Polenan,
SyowaE. Africa Standard Time,
Trollnan,
VostokCentral Asia Standard Time,
LongyearbyenW. Europe Standard Time,
AdenArab Standard Time,
AlmatyCentral Asia Standard Time,
AmmanJordan Standard Time,
AnadyrRussia Time Zone 11,
AqtauWest Asia Standard Time,
AqtobeWest Asia Standard Time,
AshgabatWest Asia Standard Time,
BaghdadArabic Standard Time,
BahrainArab Standard Time,
BakuAzerbaijan Standard Time,
BangkokSE Asia Standard Time,
BeirutMiddle East Standard Time,
BishkekCentral Asia Standard Time,
BruneiSingapore Standard Time,
ChitaNorth Asia East Standard Time,
ChoibalsanUlaanbaatar Standard Time,
Chongqingnan,
ColomboSri Lanka Standard Time,
DamascusSyria Standard Time,
DhakaBangladesh Standard Time,
DiliTokyo Standard Time,
DubaiArabian Standard Time,
DushanbeWest Asia Standard Time,
Gazanan,
Harbinnan,
Hebronnan,
Ho_Chi_Minhnan,
Hong_KongChina Standard Time,
HovdSE Asia Standard Time,
IrkutskNorth Asia East Standard Time,
JakartaSE Asia Standard Time,
JayapuraTokyo Standard Time,
JerusalemIsrael Standard Time,
KabulAfghanistan Standard Time,
KamchatkaRussia Time Zone 11,
KarachiPakistan Standard Time,
Kashgarnan,
Kathmandunan,
KatmanduNepal Standard Time,
KhandygaYakutsk Standard Time,
KolkataIndia Standard Time,
KrasnoyarskNorth Asia Standard Time,
Kuala_LumpurSingapore Standard Time,
KuchingSingapore Standard Time,
KuwaitArab Standard Time,
MacauChina Standard Time,
MagadanMagadan Standard Time,
MakassarSingapore Standard Time,
ManilaSingapore Standard Time,
MuscatArabian Standard Time,
NicosiaGTB Standard Time,
NovokuznetskNorth Asia Standard Time,
NovosibirskN. Central Asia Standard Time,
OmskN. Central Asia Standard Time,
OralWest Asia Standard Time,
Phnom_PenhSE Asia Standard Time,
PontianakSE Asia Standard Time,
Pyongyangnan,
QatarArab Standard Time,
QyzylordaCentral Asia Standard Time,
RangoonMyanmar Standard Time,
RiyadhArab Standard Time,
SakhalinVladivostok Standard Time,
SamarkandWest Asia Standard Time,
SeoulKorea Standard Time,
ShanghaiChina Standard Time,
SingaporeSingapore Standard Time,
SrednekolymskRussia Time Zone 10,
TaipeiTaipei Standard Time,
TashkentWest Asia Standard Time,
TbilisiGeorgian Standard Time,
TehranIran Standard Time,
ThimphuBangladesh Standard Time,
TokyoTokyo Standard Time,
UlaanbaatarUlaanbaatar Standard Time,
UrumqiCentral Asia Standard Time,
Ust-NeraVladivostok Standard Time,
VientianeSE Asia Standard Time,
VladivostokVladivostok Standard Time,
YakutskYakutsk Standard Time,
YekaterinburgEkaterinburg Standard Time,
YerevanCaucasus Standard Time,
AzoresAzores Standard Time,
BermudaAtlantic Standard Time,
CanaryGMT Standard Time,
Cape_VerdeCape Verde Standard Time,
Faroenan,
MadeiraGMT Standard Time,
ReykjavikGreenwich Standard Time,
South_GeorgiaUTC-02,
St_HelenaGreenwich Standard Time,
StanleySA Eastern Standard Time,
AdelaideCen. Australia Standard Time,
BrisbaneE. Australia Standard Time,
Broken_HillCen. Australia Standard Time,
CurrieTasmania Standard Time,
DarwinAUS Central Standard Time,
Euclanan,
HobartTasmania Standard Time,
LindemanE. Australia Standard Time,
Lord_Howenan,
MelbourneAUS Eastern Standard Time,
PerthW. Australia Standard Time,
SydneyAUS Eastern Standard Time,
AmsterdamW. Europe Standard Time,
AndorraW. Europe Standard Time,
AthensGTB Standard Time,
BelgradeCentral Europe Standard Time,
BerlinW. Europe Standard Time,
BratislavaCentral Europe Standard Time,
BrusselsRomance Standard Time,
BucharestGTB Standard Time,
BudapestCentral Europe Standard Time,
BusingenW. Europe Standard Time,
ChisinauGTB Standard Time,
CopenhagenRomance Standard Time,
DublinGMT Standard Time,
GibraltarW. Europe Standard Time,
GuernseyGMT Standard Time,
HelsinkiFLE Standard Time,
Isle_of_ManGMT Standard Time,
IstanbulTurkey Standard Time,
JerseyGMT Standard Time,
KaliningradKaliningrad Standard Time,
KievFLE Standard Time,
LisbonGMT Standard Time,
LjubljanaCentral Europe Standard Time,
LondonGMT Standard Time,
LuxembourgW. Europe Standard Time,
MadridRomance Standard Time,
MaltaW. Europe Standard Time,
MariehamnFLE Standard Time,
MinskBelarus Standard Time,
MonacoW. Europe Standard Time,
MoscowRussian Standard Time,
OsloW. Europe Standard Time,
ParisRomance Standard Time,
PodgoricaCentral Europe Standard Time,
PragueCentral Europe Standard Time,
RigaFLE Standard Time,
RomeW. Europe Standard Time,
SamaraRussia Time Zone 3,
San_MarinoW. Europe Standard Time,
SarajevoCentral European Standard Time,
SimferopolRussian Standard Time,
SkopjeCentral European Standard Time,
SofiaFLE Standard Time,
StockholmW. Europe Standard Time,
TallinnFLE Standard Time,
TiraneCentral Europe Standard Time,
UzhgorodFLE Standard Time,
VaduzW. Europe Standard Time,
VaticanW. Europe Standard Time,
ViennaW. Europe Standard Time,
VilniusFLE Standard Time,
VolgogradRussian Standard Time,
WarsawCentral European Standard Time,
ZagrebCentral European Standard Time,
ZaporozhyeFLE Standard Time,
ZurichW. Europe Standard Time,
GMTGMT Standard Time,
AntananarivoE. Africa Standard Time,
ChagosCentral Asia Standard Time,
ChristmasSE Asia Standard Time,
CocosMyanmar Standard Time,
ComoroE. Africa Standard Time,
KerguelenWest Asia Standard Time,
MaheMauritius Standard Time,
MaldivesWest Asia Standard Time,
MauritiusMauritius Standard Time,
MayotteE. Africa Standard Time,
ReunionMauritius Standard Time,
ApiaSamoa Standard Time,
AucklandNew Zealand Standard Time,
BougainvilleCentral Pacific Standard Time,
Chathamnan,
Chuuknan,
Easternan,
EfateCentral Pacific Standard Time,
EnderburyTonga Standard Time,
FakaofoTonga Standard Time,
FijiFiji Standard Time,
FunafutiUTC+12,
GalapagosCentral America Standard Time,
Gambiernan,
GuadalcanalCentral Pacific Standard Time,
GuamWest Pacific Standard Time,
HonoluluHawaiian Standard Time,
JohnstonHawaiian Standard Time,
KiritimatiLine Islands Standard Time,
KosraeCentral Pacific Standard Time,
KwajaleinUTC+12,
MajuroUTC+12,
Marquesasnan,
MidwayUTC-11,
NauruUTC+12,
NiueUTC-11,
Norfolknan,
NoumeaCentral Pacific Standard Time,
Pago_PagoUTC-11,
PalauTokyo Standard Time,
Pitcairnnan,
Pohnpeinan,
PonapeCentral Pacific Standard Time,
Port_MoresbyWest Pacific Standard Time,
RarotongaHawaiian Standard Time,
SaipanWest Pacific Standard Time,
TahitiHawaiian Standard Time,
TarawaUTC+12,
TongatapuTonga Standard Time,
TrukWest Pacific Standard Time,
WakeUTC+12,
WallisUTC+12,

LambdaTest Advanced Selenium Capabilities


In this table, LambdaTest advanced capabilities key,values and capabilities are listed.

KEYVALUESCAPABILITYDEFAULT VALUEALIASCAPABILITY DESCRIPTIONVALUE TYPEEXAMPLEPOSSIBLE ERRORS
videotrue, falseBy default, the video is set as true. This capability helps in video recording of the complete screen while the test gets executed. You can record maximum up to 10 minutes. In case you need to turn off the video recording, you can do so by turning off the button on our Desired Capabilities Generator.
If you turn the video flag off, then for Java, it may provide the below piece of code in the capabilities class.
capabilities.setCapability("video",false);
TRUEvideo recording of the complete screenBooleancapabilities.setCapability(""video"",false);Case Sensitive
Unable to generate video
Video is not playing in video player
visualtrue, falseCommand by command screenshots will be recorded at each test step. By default the flag is set as off.
Note: test execution time will increase if it’s set as ‘true’.
capabilities.setCapability("visual",true);
FALSEdebugCommand by command screenshots will be recorded at each test step. By default the flag is set as off. Note: test execution time will increase if it’s set as ‘true’.Booleancapabilities.setCapability(""visual"",true);Case sensitive
Unable to generate screenshot
Screenshot is broken
networktrue, falseCaptures a recording for network packets while the test gets executed. By default, the network flag is set as false.
Note: test execution time will increase if it’s set as ‘true’.
capabilities.setCapability("network",true);
FALSEnetworkLogsrecording for newtwork packetsBooleancapabilities.setCapability(""network"",true);Case sensitive
Network logs not supported
consoletrue, falseJavaScript logs will be recorded for the test. By default, it is set as false.
Note: test execution time will increase if it’s set as ‘true’.
capabilities.setCapability("console",true);
FALSECapture browser console errorsCapture browser console errorsStringJavascript logs will be recorded for the test. By default, it is set as false. capabilities.setCapability("console","disable");Case Sensitive
No error found
Not supported on this browser
tunneltrue, falseTo test your locally hosted web application with Lambda Tunnel, which establishes an SSH(Secure Shell) connection between your system and our cloud servers. By default, the tunnel flag, will be set as false.
capabilities.setCapability("tunnel",true);
Find more about Lambda Tunnel from our documentation to test on locally hosted web applications.
FALSElocalTo test your locally hosted web application with LambdaTest Tunnel which establishes an SSH(Secure Shell) connection between your system and our cloud servers. By default, the tunnel flag, will be set as false.Booleancapabilities.setCapability("tunnel",true);
Find more about LambdaTest Tunnel from our documentation to test on locally hosted web applications.
Case Sensitive
Tunnel not running
tunnelNameYour desire tunnel nameTo provide the tunnel identifier in your test suite capability when user wants to execute the test through a particular tunnel
capabilities.setCapability("tunnelName","your desire tunnel name");
localNameTunnel Name to identify your tunnel among all tunnels in your accountStringcapabilities.setCapability("tunnelName","your desire tunnel name");Case Sensitive
Tunnel not running
Tunnel Name not exists
timezoneExample: UTC+07:00Represents the custom timezone you select for executing a test.
capabilities.setCapability("timezone","UTC+07:00");
UTC+00:00Change the timezone of OSStringcapabilities.setCapability("timezone","UTC+07:00");Case sensitive
Timezone not supported by OS
Timezone is different

View Lighthouse Performance Metrics


LambdaTest now integrates Lighthouse to view the performance metrics (Lighthouse Audits) on its online cloud based Selenium Grid. You can now view the scores of:

  • Performance,
  • Accessibility,
  • Best Practices,
  • SEO, and
  • Progressive Web App

metrics with the help of LambdaTest.

You can view the Lighthouse Performance metrics by enabling capability via code, using the below syntax:

capabilities.setCapability("performance", true);

Please refer to the Lighthouse Performance Metrics documentation.

Network Throttling


In order to validate your website on different network profiles (LTE/3G/2G), you can simulate these network conditions using our capabilities.

KEYVALUESCAPABILITY
networkThrottlingRegular 4G, Regular 3G, Regular 2G, Good 3G, Good 2G, Offline, Reset, GPRS, DSLBased on the user-provided input, this capability helps to start test suite with default network. For example, if user selects the value Regular 4G then the capabilities will look like this:
capabilities.setCapability("networkThrottling", "Regular 4G");

For more info, visit our documentation on Network Throttling.

Headless Browser


You can now perform Headless browser testing easily, by adding their capability to your desired capabilities.

You can either do that by selecting the option Headless, under the browser-specific capabilities in the Desired Capabilities Generator, as shown in the image below:

Image

Or you can just enable the Headless capability via code, using the below syntax:

capabilities.setCapability("headless", true);

Please refer to Headless Browser Testing documentation for complete details.

Default Selenium Capabilities


KEYVALUESCAPABILITY
javascriptEnabledtrue, falseBased on the user provided input, this capability helps to enable the support for JavaScript execution.
databaseEnabledtrue, falseDecides if a session could communicate with the database.
locationContextEnabledtrue, falseDecides if a session can use the features with respect to different geographic locations.
applicationCacheEnabledtrue, falseDecides if a session is able to utilize the application cache.
browserConnectionEnabledtrue, falseDetermines the browser connectivity with respect to the query involved in the session. Also checks whether the session can be disabled if required by the end user.
webStorageEnabledtrue, falseDecides if a session is able to connect with storage objects.
acceptSslCertstrue, falseDecides if a session by default should accept all SSL certificates.
unexpectedAlertBehaviouraccept, dismiss, ignoreDetermines the action of a browser for handling alerts, prior to pointing the UnhandledAlertException.
elementScrollBehaviorintegerDetermines the scrolling behavior according to the user provided input. The user can decide if the elements should be aligned to top(0) or bottom(1) with respect to the elements scroll-ability inside the viewport. By default the value is set to 1, aligning the scroll behavior to top. This is compatible with IE and Firefox (since 2.36)

Hide/Mask Sensitive Information Through Selenium Capabilities


With the help of maskCommands capability, you can now hide sensitive and important data, sent to or retrieve from the remote browsers at LambdaTest. When used, this will hide all the keystrokes and other required values, and replace them with ‘*’ in test session logs (both text and raw).

Syntax (Java):

capabilities.setCapability("lambdaMaskCommands", {"<array of values to be hidden>"});

Image

List of comma separated values that can be hidden:

VALUEDESCRIPTION
setValuesHide/Redact all the text sent via sendKeys command.
setCookiesHide/Redact all the cookies set by the addCookie command.
getCookiesHide/Redact all the cookie values obtained using the getCookies and getCookieNamed command.

For example:

LANGUAGEEXAMPLE
Javacapabilities.setCapability(“lambdaMaskCommands”, {“setValues”, “setCookies, getCookies”});
Node.jscapabilities[‘lambdaMaskCommands’] = [“setValues”, “setCookies”, “getCookies”]
C#capabilities.SetCapability(“lambdaMaskCommands”, {“setValues”, “setCookies”, “getCookies”});
PHP$capabilities[“lambdaMaskCommands”] = array(“setValues”, “setCookies”, “getCookies”)
Pythoncapabilities[“lambdaMaskCommands”] = [“setValues”, “setCookies”, “getCookies”]
Rubycapabilities[“lambdaMaskCommands”] = [“setValues”, “setCookies”, “getCookies”]

Got any questions?
Please reach out at our 24x7 Chat Support or you could also mail us at support@lambdatest.com.

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

Book Demo

Help and Support

Related Articles