SetAuthenticationReply
Description
Use this command to simulate different authentication responses on applications that request a user fingerprint authentication.
It is recommended to execute the command before an authentication request dialog is displayed.
info
-
This is supported only on devices that allow TouchID.
-
The Launched Application needs to be Instrumented Only.
-
In Android, mocking authentication is supported for applications which use the native implementation. Mock authentication is not supported for third party libraries.
Parameters
Name | Type | Possible Values | Description |
---|---|---|---|
Reply | String | iOS - * MockFullGUI * Success * StopMock * AuthenticationFailedError * UserCancelError * UserFallbackError * SystemCancelError * PasscodeNotSetError Android - * CLEAR_MOCK * AUTHENTICATION_SUCCEEDED * AUTHENTICATION_FAILED * ERROR_CANCELED * ERROR_HW_UNAVAILABLE * ERROR_LOCKOUT * ERROR_NO_SPACE * ERROR_UNABLE_TO_PROCESS * ERROR_VENDOR_BASE * FP_ACQUIRED_GOOD * FP_ACQUIRED_PARTIAL | Reply type to mock. |
Delay | Int | Delay in milliseconds after authentication request dialog is open. |
Usage
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
SetAuthenticationReply
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
// deviceid here should be if of an iOS device.
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
//Sets Auth Reply as Success.
seetest.SetAuthenticationReply("Success", 0);