Set fingerprint (FR)
Perfecto Command
mobile:fingerprint:set
Purpose
Injects the authentication reply for a fingerprint check performed by the application. The command should be activated by the automation script at the point that the target application presents a "popup" indicating that the application is trying to retrieve information from the fingerprint reader.
The application must have been installed with sensor instrumention enabled.
To use this command, one of the two application identifiers is required. For information on retrieving the application identifier, see Application identifier.
Important:
It is mandatory to set a passcode for an iOS device prior to configuring the device for Touch ID. Disabling the passcode after configuring the Touch ID will result in failure when attempting to use the fingerprint injection.
Restriction: Perfecto does not support devices running iOS 15 or later that are locked with a passcode. On such devices, Perfecto's sensor instrumentation simulates the device's behavior as if it was locked with a passcode, allowing for sensor authentication testing.
Parameters
Name | Values | Default | Description |
---|---|---|---|
identifier |
|
|
The identifier of the application. |
resultAuth | success (Success) fail (Fail) |
Success | The authentication result returned by the fingerprint checking procedure. |
errorType | authFailed (Auth Failed) userCancel (User Cancel) userFallback (User Fallback) systemCancel (System Cancel) lockOut (Lock Out) |
Auth Failed | The Error type is used when the Authentication result is false to indicate the reason that the authentication failed. The default isAuth Failed. Auth Failed- indicates that the fingerprint was not recognized. User Cancel- indicates that the user canceled the authentication. User Fallback- indicates that user wishes to supply a fallback authentication, for example a password. System Cancel- indicates that the system canceled the authentication. Lock Out- indicates multiple failures and application should lock the account. |
Return Value
None
Exceptions
- Failed to invoke setFingerprint command on device: handset server: Fingerprint command not supported
- Failed to invoke setFingerprint command on device: handset server: Fingerprint not enrolled on device
- Failed to invoke setFingerprint command on device: handset server:could not activate fingerprint on device
Examples
Java sample
Map<String, Object> params = new HashMap<>(); params.put("identifier", FingerPrint.APP_BUNDLE_ID); params.put("resultAuth", expectedResult); driver.executeScript("mobile:fingerprint:set", params);