Select a device based on supported features

The Appium driver selects the device to automate as part of the instantiation of the driver object. Identifying the device to select is based on setting the set of DesiredCapabilities.

Perfecto also lets you add Perfecto-related capabilities when selecting a device. For example, if the test case you want to run requires a device that supports the set Location feature and does not support the touch ID feature, you need to specify the following capabilities:

Copy
capabilities.setCapability("perfecto:fingerPrintSupport", false);
capabilities.setCapability("perfecto:setLocationSupport", true);

If the test case you want to run requires a Samsung Galaxy device running Android 5 or Android 6 and supports the motion Injection feature, you need to specify the following capabilities: 

Copy
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "[56].*");
capabilities.setCapability("manufacturer", "Samsung");
capabilities.setCapability("model", "Galaxy.*");
capabilities.setCapability("perfecto:motionInjectionSupport", true);

To select the device based on supported features, use any of the capabilities specified in the following table.

Settings

Description

Key

Value Type

Fingerprint support

Whether the device supports the Set fingerprint feature.

perfecto:fingerPrintSupport
                            

boolean

Motion notifications injection support

Whether the device supports the Motion Notifications Injection feature.

perfecto:motionInjectionSupport
                            

boolean

FaceID support

Whether the device supports the Face ID feature.

perfecto:faceIDSupport
                            

boolean

Image injection support

Whether the device supports the Image Injection feature.

perfecto:imageInjectionSupport
                            

boolean

Voice assistant inject support

Whether the device supports the Voice assistant inject feature.

perfecto:voiceAssistantInjectionSupport
                            

boolean

Force touch support

Whether the device supports the Force Touch (3D Touch) feature.

perfecto:forceTouch
                            

boolean

Set location support

Whether the device supports the Set device location feature.

perfecto:setLocationSupport
                            

boolean

Reboot support

Whether the device supports the Reboot Device feature.

perfecto:rebootSupport
                            

boolean