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 window indicating that the application is trying to retrieve information from the fingerprint reader.
To learn more about fingerprint (biometric) injection, including requirements and limitations, see Biometric injection overview.
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
Copy
Java
Map<String, Object> params = new HashMap<>();
params.put("identifier", FingerPrint.APP_BUNDLE_ID);
params.put("resultAuth", expectedResult);
driver.executeScript("mobile:fingerprint:set", params);