Device Setup Properties
Name | Description | Example (Java) |
---|---|---|
udid | unique device identifier | dc.setCapability(MobileCapabilityType.UDID, "ABCDE12345"); |
platformVersion | specific mobile device version number | dc.setCapability(MobileCapabilityType.PLATFORM_VERSION, "5.0") |
deviceManufacture | device manufacture | dc.setCapability("deviceManufacturer", "samsung"); |
deviceModel | device model | dc.setCapability("deviceModel", "iphone 6"); |
deviceCategory | device category | dc.setCapability("deviceCategory", "PHONE"); |
deviceWithAudio | For devices with audio injection \ extraction support (default: false) | dc.setCapability("deviceWithAudio", true); |
deviceQuery | Query device. For list of available properties. (see WaitForDevice) | dc.setCapability("deviceQuery", "@os='android' and @manufacture='samsung"); |
orientation | Start the test when the device in a certain orientation. values: "landscape" / "portrait" | dc.setCapability(MobileCapabilityType.ORIENTATION, "landscape"); |
releaseDevice | Gives the capability to not release a device after performing driver.quit(); Values 'true'/false'
The Ability to use the command depends on the permissions on the project for the connecting user. If the user doesn't have the permission not to release the device on driver.quit(), the setting will be ignored and default value will be applied This flag will be ignored and devices will not be released in following cases:
| dc.setCapability("releaseDevice", false); |
deviceCleanup | Performs a device cleanup after the session ends. The option will only be operational if the project settings allows it. if Enable release without cleanup is unchecked, the settings deviceCleanup is ignored and a cleanup is performed unconditionally. Values true/false default value: true | dc.setCapability("deviceCleanup", "false") |
onlyAvailable | Use only available devices | dc.setCapability("onlyAvailable", true); |
Some of the important things to consider on the capabilities mentioned are,
- deviceQuery - This capability will override any other capabilities set by the user, and it will determine the device for test
- UDID - You can find the mobile device UDID
- Other Capabilities - The rest of the capabilities are just extensions of the deviceQuery capability (e.g Audio \ Manufacture) and we will construct a query based on the other capabilities which you have provided.