Package de.bmiag.tapir.selenium.service
Class ImplicitWaitServiceImpl
- java.lang.Object
-
- de.bmiag.tapir.selenium.service.ImplicitWaitServiceImpl
-
- All Implemented Interfaces:
ImplicitWaitService
@Component("tapirImplicitWaitService") @Scope(scopeName="thread", proxyMode=INTERFACES) public class ImplicitWaitServiceImpl extends java.lang.Object implements ImplicitWaitService
Default implementation ofImplicitWaitService
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description ImplicitWaitServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
executeWithDefaultImplicitWaitTime(java.util.function.Supplier<T> supplier)
Executes the given supplier with configured default implicit wait time.<T> T
executeWithoutWaiting(java.util.function.Supplier<T> supplier)
Executes the given supplier without waiting implicitly.<T> T
executeWithTimeout(long timeoutInMillis, java.util.function.Supplier<T> supplier)
Executes the given supplier with the given implicit wait time (in ms).void
initialize()
-
-
-
Method Detail
-
initialize
@PostConstruct public void initialize()
-
executeWithoutWaiting
public <T> T executeWithoutWaiting(java.util.function.Supplier<T> supplier)
Description copied from interface:ImplicitWaitService
Executes the given supplier without waiting implicitly.- Specified by:
executeWithoutWaiting
in interfaceImplicitWaitService
- Type Parameters:
T
- The return type of the given supplier- Parameters:
supplier
- The code to be executed- Returns:
- the result of the given lambda
-
executeWithDefaultImplicitWaitTime
public <T> T executeWithDefaultImplicitWaitTime(java.util.function.Supplier<T> supplier)
Description copied from interface:ImplicitWaitService
Executes the given supplier with configured default implicit wait time.- Specified by:
executeWithDefaultImplicitWaitTime
in interfaceImplicitWaitService
- Type Parameters:
T
- The return type of the given supplier- Parameters:
supplier
- The code to be executed- Returns:
- the result of the given lambda
-
executeWithTimeout
public <T> T executeWithTimeout(long timeoutInMillis, java.util.function.Supplier<T> supplier)
Description copied from interface:ImplicitWaitService
Executes the given supplier with the given implicit wait time (in ms).- Specified by:
executeWithTimeout
in interfaceImplicitWaitService
- Type Parameters:
T
- The return type of the given supplier- Parameters:
timeoutInMillis
- the implicit wait time (in ms)supplier
- The code to be executed- Returns:
- the result of the given lambda
-
-