|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.support.ui.LoadableComponent<T>
T
- The type to be returned (normally the subclass' type)public abstract class LoadableComponent<T extends LoadableComponent<T>>
Represents any abstraction of something that can be loaded. This may be an entire web page, or simply a component within that page (such as a login box or menu) or even a service. The expected usage is:
new HypotheticalComponent().get();
After the get()
method is called, the component will be loaded and
ready for use. This is verified using Assert.assertTrue so expect to catch an Error rather than
an Exception when errors occur. *
Constructor Summary | |
---|---|
LoadableComponent()
|
Method Summary | |
---|---|
T |
get()
Ensure that the component is currently loaded. |
protected abstract void |
isLoaded()
Determine whether or not the component is loaded. |
protected abstract void |
load()
When this method returns, the component modeled by the subclass should be fully loaded. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoadableComponent()
Method Detail |
---|
public T get()
Error
- when the component cannot be loaded.protected abstract void load()
protected abstract void isLoaded() throws Error
This behaviour makes it readily visible when a page has not been loaded successfully, and because an error and not an exception is thrown tests should fail as expected. By using Error, we also allow the use of junit's "Assert.assert*" methods
Error
- when the page is not loaded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |