Package io.fluentlenium.core.hook
Interface HookControl<T>
- Type Parameters:
T
- self type
- All Known Subinterfaces:
FluentList<E>
- All Known Implementing Classes:
FluentListImpl
,FluentWebElement
,HookControlImpl
public interface HookControl<T>
Control interface for hooks.
-
Method Summary
Modifier and TypeMethodDescriptionnoHook()
Disable all hooks from actual element.noHook
(Class<? extends FluentHook>... hooks) Disable given hook from actual element.<R> R
noHook
(Class<? extends FluentHook> hook, Function<T, R> function) Invoke a function with no hook.<R> R
Invoke a function with no hook.Creates a new element locator instance with all hooks disabled.noHookInstance
(Class<? extends FluentHook>... hooks) Creates a new element locator instance with given hook disabled.Retore hooks that were defined initially.<O,
H extends FluentHook<O>>
TEnable a hook with default options.<O,
H extends FluentHook<O>>
TEnable a hook with given options.
-
Method Details
-
noHook
T noHook()Disable all hooks from actual element.- Returns:
- this object reference to chain calls
-
noHook
Disable given hook from actual element.- Parameters:
hooks
- hook classes to disable- Returns:
- this object reference to chain calls
-
restoreHooks
T restoreHooks()Retore hooks that were defined initially.- Returns:
- this object reference to chain calls
-
withHook
Enable a hook with default options.- Type Parameters:
O
- Type of the hookH
- Type of the hook options- Parameters:
hook
- hook class to enable- Returns:
- this object reference to chain calls
-
withHook
Enable a hook with given options.- Type Parameters:
O
- Type of the hookH
- Type of the hook options- Parameters:
hook
- hook class to enableoptions
- hook options to apply- Returns:
- this object reference to chain calls
-
noHook
Invoke a function with no hook.- Type Parameters:
R
- return type- Parameters:
function
- function to invoke- Returns:
- return value of the given function
-
noHook
Invoke a function with no hook.- Type Parameters:
R
- return type- Parameters:
hook
- hook class to disablefunction
- function to invoke- Returns:
- return value of the given function
-
noHookInstance
T noHookInstance()Creates a new element locator instance with all hooks disabled.- Returns:
- new element locator with hook disabled.
-
noHookInstance
Creates a new element locator instance with given hook disabled.- Parameters:
hooks
- hook classes to disable- Returns:
- new element locator with hook disabled.
-