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 DESCRIPTIONSUPPORTED ON
userTYPE: STRINGYour LT_USERNAMEVirtual-Device Real-Device
accessKeyTYPE: STRINGYour LT_Access_KeyVirtual Device Real Device
isRealMobileTYPE: BOOLEAN
DEFAULT: FALSE
isRealMobile=TRUE
OR
isRealMobile=FALSE
This capability is used to run the test on Real Device with True value.Virtual Device Real Device
deviceNameTYPE: STRING
iPhone 13
Name of the device.Virtual Device Real Device
platformNameTYPE: STRING
ios
Name of the OS.Virtual Device Real Device
platformVersionTYPE: STRING
14
OS version.Virtual Device Real Device

Debugging Options

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

Test configuration

KEYVALUESCAPABILITY DESCRIPTIONSUPPORTED ON
buildTYPE: STRING
DEFAULT: Untitled
build=iOS Small Run
You can group your tests like a job containing multiple tests.Virtual Device Real Device
nameTYPE: STRING
DEFAULT: TestID of the Test. In case the Name is not passed.
name=iphone 6 Small Run
Name of your test.Virtual Device Real Device
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.Virtual Device Real Device
queueTimeoutTYPE: Integer
DEFAULT: 600
queueTimeout=300
This capability can be used to modify the Queue timeout value within a range. queueTimeout Range : 300-900.Virtual Device Real Device
idleTimeoutTYPE: Integer
DEFAULT: 120
idleTimeout=120
This capability can be used to modify the timeout value.Virtual Device Real Device
deviceOrientationTYPE: STRING
DEFAULT: PORTRAIT
deviceOrientation=portrait
OR
deviceOrientation=landscape
Change the screen orientation of the device.Virtual Device Real 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.Virtual Device Real Device
newCommandTimeoutTYPE: STRING
DEFAULT: 60
newCommandTimeout=60
How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the session.Virtual Device Real Device
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.
Virtual Device Real Device
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.Virtual Device Real Device
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.
Virtual Device Real Device
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.
Real Device
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"
Virtual Device Real Device
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.
Virtual Device Real Device
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.
Virtual Device Real Device
w3cTYPE: Boolean
DEFAULT: FALSE
w3c: true
Appium will use the W3C webdriver protocol when it's set to true.Virtual Device Real Device
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.Virtual Device Real Device

Android

KEYVALUESCAPABILITY DESCRIPTIONSUPPORTED ON
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.
Real Device
appActivityTYPE: String
com.lambdatest.proverbial/.home
Launch the activity directly on the device using the App Activity. Only for Android.Virtual Device Real Device
appPackageTYPE: String
com.lambdatest.proverbial
Launch the app directly on the device using the App Package. Only for Android.Virtual Device Real Device

iOS

KEYVALUESCAPABILITY DESCRIPTIONSUPPORTED ON
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
Real Device
bundleIdTYPE: String
com.whatsapp
Launch the app directly on the device using the Bundle ID. Only for iOS.Virtual Device Real Device
autoDismissAlertsTYPE: BOOLEAN
DEFAULT: False
autoDismissAlerts=TRUE
OR
autoDismissAlerts=FALSE
Appium capability to Dismiss alerts/popups on iOS Devices.Virtual Device Real Device
autoAcceptAlertsTYPE: BOOLEAN
DEFAULT: True
autoAcceptAlerts=TRUE
OR
autoAcceptAlerts=FALSE
Appium capability to Accept alerts/popups on iOS Devices.Virtual Device Real Device
noResetTYPE: BOOLEAN
DEFAULT: False
true
Don't reset app state before this session. See here for more details.Virtual Device Real Device

Real User conditions

KEYVALUESCAPABILITY DESCRIPTIONSUPPORTED ON
languageTYPE: STRING
fr
Language to set for iOS (XCUITest driver only) and Android.Virtual Device Real Device
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.
Virtual Device Real Device
disableAnimationTYPE: BOOLEAN
DEFAULT: False
disableAnimation = true
Disable all kinds of animations on the complete device [including all applications] that is running the test.Virtual Device Real Device
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.Virtual Device Real Device
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.
Virtual Device Real 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.
Virtual Device Real Device
enableImageInjectionTYPE: Boolean
DEFAULT: false
enableImageInjection: true
Used to enable the Image Injection for the app.
Must send "media" capability along with this capability.
Virtual Device Real Device
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.
Real Device
enableBluetoothTYPE: Boolean
DEFAULT: false
enableBluetooth: true
Used to enable the bluetooth functionality during the session.Real Device
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.
Virtual Device Real Device

Device configuration

KEYVALUESCAPABILITY DESCRIPTIONSUPPORTED ON
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.Virtual Device Real Device
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.
Virtual Device Real Device

Network configuration

KEYVALUESCAPABILITY DESCRIPTIONSUPPORTED ON
tunnelTYPE: BOOLEAN
tunnel=TRUE
OR
tunnel=FALSE
To test local applications with LambdaTest.Virtual Device Real Device
tunnelNameTYPE: STRING
tunnelName=RabbitHole
Name of the tunnel.Virtual Device Real Device
dedicatedProxyTYPE: BOOLEAN
dedicatedProxy=TRUE
OR
dedicatedProxy=FALSE
Dedicated Proxy.Virtual Device Real Device
blockDomainsTYPE: Array of Strings
"blockDomains": ["www.facebook.com", "www.amazon.com"]
It is used to block the mentioned domains on the device.Real 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