Skip to main content

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

NameTypePossible ValuesDescription
ReplyStringiOS -



* 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.
DelayIntDelay in milliseconds after authentication request dialog is open.

Usage

info

Replace <server> with the appropriate URL.

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);