-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.interceptors.behaviorkautomator.DeviceBehaviorInterceptor,com.kaspersky.kaspresso.interceptors.behaviorkautomator.KautomatorBehaviorInterceptor,com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProvider
public final class SystemDialogSafetyDeviceBehaviorInterceptor implements DeviceBehaviorInterceptor, SystemDialogSafetyProvider
The implementation of DeviceBehaviorInterceptor and SystemDialogSafetyProvider interfaces. Provides system dialog safety functionality for UiDeviceInteraction.perform and UiDeviceInteraction.check calls.
-
-
Constructor Summary
Constructors Constructor Description SystemDialogSafetyDeviceBehaviorInterceptor(UiTestLogger logger, UiDevice uiDevice, AdbServer adbServer)
-
Method Summary
Modifier and Type Method Description <T extends Any> TinterceptCheck(UiDeviceInteraction interaction, UiOperation<UiDevice> assertion, Function0<T> activity)Wraps the given activity invocation with the system dialog safety. <T extends Any> TinterceptPerform(UiDeviceInteraction interaction, UiOperation<UiDevice> action, Function0<T> activity)Wraps the given activity invocation with the system dialog safety. -
Methods inherited from class com.kaspersky.kaspresso.interceptors.behaviorkautomator.KautomatorBehaviorInterceptor
equals, hashCode, toString -
Methods inherited from class com.kaspersky.kaspresso.interceptors.behaviorkautomator.impl.systemsafety.SystemDialogSafetyDeviceBehaviorInterceptor
passSystemDialogs -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SystemDialogSafetyDeviceBehaviorInterceptor
SystemDialogSafetyDeviceBehaviorInterceptor(UiTestLogger logger, UiDevice uiDevice, AdbServer adbServer)
-
-
Method Detail
-
interceptCheck
<T extends Any> T interceptCheck(UiDeviceInteraction interaction, UiOperation<UiDevice> assertion, Function0<T> activity)
Wraps the given activity invocation with the system dialog safety.
- Parameters:
interaction- the intercepted UiDeviceInteraction.assertion- the intercepted UiDeviceAssertion.activity- the activity to invoke.
-
interceptPerform
<T extends Any> T interceptPerform(UiDeviceInteraction interaction, UiOperation<UiDevice> action, Function0<T> activity)
Wraps the given activity invocation with the system dialog safety.
- Parameters:
interaction- the intercepted UiDeviceInteraction.action- the intercepted UiDeviceAction.activity- the activity to invoke.
-
-
-
-