Package org.openqa.selenium.support.ui
Class SlowLoadableComponent<T extends LoadableComponent<T>>
java.lang.Object
org.openqa.selenium.support.ui.LoadableComponent<T>
org.openqa.selenium.support.ui.SlowLoadableComponent<T>
- Type Parameters:
T
- The type to be returned (normally the subclass' type)
public abstract class SlowLoadableComponent<T extends LoadableComponent<T>>
extends LoadableComponent<T>
A
LoadableComponent
which might not have finished loading when load() returns. After a
call to load(), the isLoaded() method should continue to fail until the component has fully
loaded.
new SlowHypotheticalComponent().get();
-
Constructor Summary
ConstructorsConstructorDescriptionSlowLoadableComponent
(Clock clock, int timeOutInSeconds) Deprecated.SlowLoadableComponent
(Clock clock, Duration timeOut) -
Method Summary
Methods inherited from class org.openqa.selenium.support.ui.LoadableComponent
isLoaded, load
-
Constructor Details
-
SlowLoadableComponent
Deprecated.UseSlowLoadableComponent(Clock, Duration)
instead. -
SlowLoadableComponent
-
-
Method Details
-
get
Description copied from class:LoadableComponent
Ensure that the component is currently loaded.- Overrides:
get
in classLoadableComponent<T extends LoadableComponent<T>>
- Returns:
- The component.
-
isError
Check for well known error cases, which would mean that loading has finished, but an error condition was seen. If an error has occurred throw an Error, possibly by using JUnit's Assert.assert* methods- Throws:
Error
- When a well-known error condition has caused the load to fail
-
sleepFor
protected long sleepFor()
-
SlowLoadableComponent(Clock, Duration)
instead.