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
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
user | TYPE: STRING | Your LT_USERNAME | Virtual-Device Real-Device |
accessKey | TYPE: STRING | Your LT_Access_Key | Virtual Device Real Device |
isRealMobile | TYPE: 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 |
deviceName | TYPE: STRING iPhone 13 | Name of the device. | Virtual Device Real Device |
platformName | TYPE: STRING ios | Name of the OS. | Virtual Device Real Device |
platformVersion | TYPE: STRING 14 | OS version. | Virtual Device Real Device |
Debugging Options
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
video | TYPE: BOOLEAN DEFAULT: TRUE video=TRUE OR video=FALSE | Video recording of the complete screen. | Virtual Device Real Device |
devicelog | TYPE: BOOLEAN DEFAULT: FALSE devicelog=TRUE OR devicelog=FALSE | Enable Device logs. | Virtual Device Real Device |
network | TYPE: BOOLEAN DEFAULT: FALSE network=TRUE OR network=FALSE | Enable Network logs. | Virtual Device Real Device |
console | TYPE: Boolean DEFAULT: FALSE console: true | Used to fetch the console logs. | Virtual Device Real Device |
Test configuration
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
build | TYPE: STRING DEFAULT: Untitled build=iOS Small Run | You can group your tests like a job containing multiple tests. | Virtual Device Real Device |
name | TYPE: 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 |
project | Will 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 |
queueTimeout | TYPE: 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 |
idleTimeout | TYPE: Integer DEFAULT: 120 idleTimeout=120 | This capability can be used to modify the timeout value. | Virtual Device Real Device |
deviceOrientation | TYPE: STRING DEFAULT: PORTRAIT deviceOrientation=portrait OR deviceOrientation=landscape | Change the screen orientation of the device. | Virtual Device Real Device |
orientation | TYPE: 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 |
newCommandTimeout | TYPE: 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 |
automationName | TYPE: 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 |
eventTimings | TYPE: 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 |
otherApps | TYPE: 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 |
globalHttpProxy | TYPE: 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 |
region | TYPE: 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 |
waitForIdleTimeout | TYPE: 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 |
privateCloud | TYPE: 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 |
w3c | TYPE: Boolean DEFAULT: FALSE w3c: true | Appium will use the W3C webdriver protocol when it's set to true. | Virtual Device Real Device |
autoLaunch | TYPE: 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
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
playStoreLogin | TYPE: 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 |
appActivity | TYPE: String com.lambdatest.proverbial/.home | Launch the activity directly on the device using the App Activity. Only for Android. | Virtual Device Real Device |
appPackage | TYPE: String com.lambdatest.proverbial | Launch the app directly on the device using the App Package. Only for Android. | Virtual Device Real Device |
iOS
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
resignApp | TYPE: 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 |
bundleId | TYPE: String com.whatsapp | Launch the app directly on the device using the Bundle ID. Only for iOS. | Virtual Device Real Device |
autoDismissAlerts | TYPE: BOOLEAN DEFAULT: False autoDismissAlerts=TRUE OR autoDismissAlerts=FALSE | Appium capability to Dismiss alerts/popups on iOS Devices. | Virtual Device Real Device |
autoAcceptAlerts | TYPE: BOOLEAN DEFAULT: True autoAcceptAlerts=TRUE OR autoAcceptAlerts=FALSE | Appium capability to Accept alerts/popups on iOS Devices. | Virtual Device Real Device |
noReset | TYPE: BOOLEAN DEFAULT: False true | Don't reset app state before this session. See here for more details. | Virtual Device Real Device |
Real User conditions
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
language | TYPE: STRING fr | Language to set for iOS (XCUITest driver only) and Android. | Virtual Device Real Device |
locale | TYPE: 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 |
disableAnimation | TYPE: 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 |
lambdaMaskCommands | TYPE: 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 |
timezone | TYPE: 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 |
geoLocation | TYPE: 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 |
enableImageInjection | TYPE: 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 |
media | TYPE: 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 |
enableBluetooth | TYPE: Boolean DEFAULT: false enableBluetooth: true | Used to enable the bluetooth functionality during the session. | Real Device |
location | TYPE: 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
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
autoGrantPermissions | TYPE: 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 |
proxyUrl | TYPE: 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
KEY | VALUES | CAPABILITY DESCRIPTION | SUPPORTED ON |
---|---|---|---|
tunnel | TYPE: BOOLEAN tunnel=TRUE OR tunnel=FALSE | To test local applications with LambdaTest. | Virtual Device Real Device |
tunnelName | TYPE: STRING tunnelName=RabbitHole | Name of the tunnel. | Virtual Device Real Device |
dedicatedProxy | TYPE: BOOLEAN dedicatedProxy=TRUE OR dedicatedProxy=FALSE | Dedicated Proxy. | Virtual Device Real Device |
blockDomains | TYPE: 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.