-
- All Implemented Interfaces:
-
com.kaspersky.kaspresso.autoscroll.AutoScrollProvider,com.kaspersky.kaspresso.interceptors.behaviorkautomator.KautomatorBehaviorInterceptor,com.kaspersky.kaspresso.interceptors.behaviorkautomator.ObjectBehaviorInterceptor
public final class AutoScrollObjectBehaviorInterceptor implements ObjectBehaviorInterceptor, AutoScrollProvider<UiObjectInteraction>
The implementation of ObjectBehaviorInterceptor and AutoScrollProvider interfaces. Provides autoscroll on failure functionality for UiObjectInteraction.perform and UiObjectInteraction.check calls.
-
-
Constructor Summary
Constructors Constructor Description AutoScrollObjectBehaviorInterceptor(UiTestLogger logger, AutoScrollParams autoScrollParams)
-
Method Summary
Modifier and Type Method Description <T extends Any> TinterceptCheck(UiObjectInteraction interaction, UiOperation<UiObject2> assertion, Function0<T> activity)Wraps the given assertion invocation with the autoscrolling on failure. <T extends Any> TinterceptPerform(UiObjectInteraction interaction, UiOperation<UiObject2> action, Function0<T> activity)Wraps the given action invocation with the autoscrolling on failure. -
Methods inherited from class com.kaspersky.kaspresso.interceptors.behaviorkautomator.KautomatorBehaviorInterceptor
equals, hashCode, toString -
Methods inherited from class com.kaspersky.kaspresso.interceptors.behaviorkautomator.impl.autoscroll.AutoScrollObjectBehaviorInterceptor
scroll, withAutoScroll -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AutoScrollObjectBehaviorInterceptor
AutoScrollObjectBehaviorInterceptor(UiTestLogger logger, AutoScrollParams autoScrollParams)
-
-
Method Detail
-
interceptCheck
<T extends Any> T interceptCheck(UiObjectInteraction interaction, UiOperation<UiObject2> assertion, Function0<T> activity)
Wraps the given assertion invocation with the autoscrolling on failure.
- Parameters:
interaction- the intercepted UiObjectInteraction.assertion- the assertion to invoke.activity- a function-wrapper of an action or an assertion to be invoked.
-
interceptPerform
<T extends Any> T interceptPerform(UiObjectInteraction interaction, UiOperation<UiObject2> action, Function0<T> activity)
Wraps the given action invocation with the autoscrolling on failure.
- Parameters:
interaction- the intercepted UiObjectInteraction.action- the assertion to invoke.activity- a function-wrapper of an action or an assertion to be invoked.
-
-
-
-