Skip to main content

Desired Capabilities

Desired capabilities in Appium are essential for guiding the Appium server to create the correct test automation environment. Represented as a set of key-value pairs within a JSON object, these capabilities allow QA automation engineers to specify the desired mobile platform and configuration for their test sessions.

By setting these parameters, QAs can ensure that the Appium server accurately targets the intended test environment, facilitating effective and efficient mobile app testing.

Note: With LambdaTest capabilities generator run your App Automation leveraging Appium Desktop.

Mandatory capabilities

KEYVALUESCAPABILITY DESCRIPTION
userTYPE: STRINGYour LT_USERNAME
accessKeyTYPE: STRINGYour LT_Access_Key
isRealMobileTYPE: BOOLEAN
DEFAULT: FALSE
isRealMobile=TRUE
OR
isRealMobile=FALSE
This capability is used to run the test on Real Device.
deviceNameTYPE: STRING
iPhone 13
Name of the device.
platformNameTYPE: STRING
ios
Name of the OS.
platformVersionTYPE: STRING
14
OS version.

Debugging Options

KEYVALUESCAPABILITY DESCRIPTION
videoTYPE: BOOLEAN
DEFAULT: TRUE
video=TRUE
OR
video=FALSE
Video recording of the complete screen.
devicelogTYPE: BOOLEAN
DEFAULT: FALSE
devicelog=TRUE
OR
devicelog=FALSE
Enable Device logs.
networkTYPE: BOOLEAN
DEFAULT: FALSE
network=TRUE
OR
network=FALSE
Enable Network logs.
consoleTYPE: Boolean
DEFAULT: FALSE
console: true
Used to fetch the console logs.

Test configuration

KEYVALUESCAPABILITY DESCRIPTION
buildTYPE: STRING
DEFAULT: Untitled
build=iOS Small Run
You can group your tests like a job containing multiple tests.
nameTYPE: STRING
DEFAULT: TestID of the Test. In case the Name is not passed.
name=iphone 6 Small Run
Name of your test.
projectWill remain blank in case 'project' is not passed in capability.
project=Small Run
You can group your builds like a project containing multiple jobs.
queueTimeoutTYPE: Integer
DEFAULT: 600
queueTimeout=300
This capability can be used to modify the Queue timeout value within a range. queueTimeout Range : 300-900.
idleTimeoutTYPE: Integer
DEFAULT: 120
idleTimeout=120
This capability can be used to modify the timeout value.
deviceOrientationTYPE: STRING
DEFAULT: PORTRAIT
deviceOrientation=portrait
OR
deviceOrientation=landscape
Change the screen orientation of the device.
orientationTYPE: STRING
orientation=auto
This capability allows the app or browser to automatically adjust its display based on the physical orientation of the device.
newCommandTimeoutTYPE: STRING
DEFAULT: 60
newCommandTimeout=60
automationNameTYPE: STRING
DEFAULT (Android): UiAutomator2
DEFAULT (iOS): XCUITest
automationName = UiAutomator2
Choose which automation engine you'd like to use.
Android - UiAutomator2, Flutter.
iOS - XCUITest, Flutter.
eventTimingsTYPE: BOOLEAN
DEFAULT: FALSE
true
Enable or disable the reporting of the timings for various Appium-internal events (e.g., the start and end of each command, etc.). To enable, use true. The timings are then reported as events property on response to querying the current session. See the event timing docs for the the structure of this response.
otherAppsTYPE: ARRAY OF STRINGS
DEFAULT: [ ] or Empty Array
"otherApps":
["lt://APP1002211081648217405891389",
"lt://APP1002211081648217429465823"]
Accepts a list of App URLs returned after uploading an app on the LambdaTest servers.
Conditions to be satisfied:
1. App should also be passed if "otherApps" is passed.
2. Length of app URL
array ≤ 3.
3. At max 3 other apps can be installed.
4. App should not be present inside 'otherApp' array.
5. No duplicates in ‘otherApp’ array.
globalHttpProxyTYPE: BOOLEAN
DEFAULT: FALSE
globalHttpProxy = true
This is only for Android specific applications and devices.
If the customer’s app requires Proxy to enable Data Transfer that is not possible otherwise, they can reach out to the CS & LT will enable it for them from BE.This is not available for customers directly unless set from BE by LT.
regionTYPE: STRING
DEFAULT: Location of the nearest data center
region = US
1. By default, it picks the location of the nearest data center.
2. If you would like to change the region of the Data Center manually, you can pass this capability.
3. Currently, only three regions are supported: Europe - "EU", USA - "US" and Asia-Pacific - "AP"
waitForIdleTimeoutTYPE: BOOLEAN
waitForIdleTimeout = 0
1. Sets the timeout for waiting for the user interface to go into an idle state before starting a UI Automator action.
2. It changes the timeout of the configuration in UIAutomator and could help to make interaction speed faster.
privateCloudTYPE: BOOLEAN
DEFAULT: FALSE
privateCloud: True
If your organization has opted for Private Cloud, then using this flag will fetch the devices from your Private Cloud.
If your organization has not opted for Private Cloud, your test can fail if this capability is passed.
w3cTYPE: Boolean
DEFAULT: FALSE
w3c: true
Appium will use the W3C webdriver protocol when it's set to true.
autoLaunchTYPE: Boolean
DEFAULT: TRUE
autoLaunch: false
If the user doesn't pass this, the app will start on boot. Else, it will not open on boot.

Android

KEYVALUESCAPABILITY DESCRIPTION
playStoreLoginTYPE: STRINGS OF HASHMAP
DEFAULT: FALSE
"playStoreLogin":
{"email":user@gmail.com","password":"ejndfdfs"}
The capability is used to login to Play Store on Android devices.
Conditions to be specified:
1. The account should not be using any kind 2 factor authentication, otherwise the test can fail.
2. The account should not require you to login using a trusted device using popup or OTP.
3. Since we clean the Device after each session, please make sure you are logging into the account during each session.
appActivityTYPE: String
com.lambdatest.proverbial/.home
Launch the activity directly on the device using the App Activity. Only for Android.
appPackageTYPE: String
com.lambdatest.proverbial
Launch the app directly on the device using the App Package. Only for Android.

iOS

KEYVALUESCAPABILITY DESCRIPTION
resignAppTYPE: BOOLEAN
DEFAULT: True
resignApp = true
1. By default, if this capability is not passed, your app will be re-signed.
2. You can pass "false" as a capability to prevent your apps from being re-signed.
3. This is only for iOS-specific applications and devices
bundleIdTYPE: String
com.whatsapp
Launch the app directly on the device using the Bundle ID. Only for iOS.
autoDismissAlertsTYPE: BOOLEAN
DEFAULT: False
autoDismissAlerts=TRUE
OR
autoDismissAlerts=FALSE
Appium capability to Dismiss alerts/popups on iOS Devices.
autoAcceptAlertsTYPE: BOOLEAN
DEFAULT: True
autoAcceptAlerts=TRUE
OR
autoAcceptAlerts=FALSE
Appium capability to Accept alerts/popups on iOS Devices.
noResetTYPE: BOOLEAN
DEFAULT: False
true
Don't reset app state before this session. See here for more details.

Real User conditions

KEYVALUESCAPABILITY DESCRIPTION
languageTYPE: STRING
fr
Language to set for iOS (XCUITest driver only) and Android.
localeTYPE: STRING
fr_CA, CA
Locale to set for iOS (XCUITest driver only) and Android. fr_CA format (language code and country name abbreviationfor iOS). CA format (country name abbreviation) for Android.
For more info, click here.
disableAnimationTYPE: BOOLEAN
DEFAULT: False
disableAnimation = true
Disable all kinds of animations on the complete device [including all applications] that is running the test.
lambdaMaskCommandsTYPE: Array of Strings
DEFAULT: Empty Array
["setValues", "setCookies", "getCookies"]
Used to make sure that the values aren't shown on the device. The text could be a Password.
timezoneTYPE: String
timezone=UTC+13:00
timezone=UTC-0400
Used to set the timezone on the device using the UTC Time.
If this capability is not passed, the device will auto update the timezone based on the physical location of the device.
geoLocationTYPE: String
geoLocation=US
geoLocation=FR
Used to change the geolocation of the device to the location provided.
If this capability is not passed, the device will auto update the Geo Location based on the physical location of the device.
enableImageInjectionTYPE: Boolean
DEFAULT: false
enableImageInjection: true
Used to enable the Image Injection for the app.
Must send "media" capability along with this capability.
mediaTYPE: STRING
media: Path to the image
Used to provide the media to upload the file to the app for Image Injection. If this capability is not passed, then the no media will be sent to the device.
Must send "enableImageInjection" capability along with this capability.
locationTYPE: HashMap

Python example:
location: {"lat": "28.6235192", "long": "77.3662948"}

For examples in other languages, please head over to Capability Generator
Used to change the GPS Geolocation of the device to the location provided.
If this capability is not passed, the device will auto update the Geo Location based on the physical location of the device.
It needs to be passed in a HashMap structure with lat & long being passed separately.

Device configuration

KEYVALUESCAPABILITY DESCRIPTION
autoGrantPermissionsTYPE: BOOLEAN
autoGrantPermissions=TRUE
OR
autoGrantPermissions=FALSE
Have Appium automatically determine which permissions your app requires and grant them to the app on install. Defaults to false. If noReset is true, this capability doesn't work.
proxyUrlTYPE: STRING
proxyUrl: 192.168.1.1:8080
Used to change the Proxy Address of the device. Data will pass through the specified proxy address.
If this capability is not passed, then there'll be no proxy being added to the device.

Network configuration

KEYVALUESCAPABILITY DESCRIPTION
tunnelTYPE: BOOLEAN
tunnel=TRUE
OR
tunnel=FALSE
To test local applications with LambdaTest.
tunnelNameTYPE: STRING
tunnelName=RabbitHole
Name of the tunnel.
dedicatedProxyTYPE: BOOLEAN
dedicatedProxy=TRUE
OR
dedicatedProxy=FALSE
Dedicated Proxy.
blockDomainsTYPE: Array of Strings
"blockDomains": ["www.facebook.com", "www.amazon.com"]
It is used to block the mentioned domains on the device.

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