private class AjaxElementLocator.SlowLoadingElementList extends SlowLoadableComponent<AjaxElementLocator.SlowLoadingElementList>
Modifier and Type | Field and Description |
---|---|
private java.util.List<org.openqa.selenium.WebElement> |
elements |
private org.openqa.selenium.NoSuchElementException |
lastException |
Constructor and Description |
---|
SlowLoadingElementList(Clock clock,
int timeOutInSeconds) |
Modifier and Type | Method and Description |
---|---|
java.util.List<org.openqa.selenium.WebElement> |
getElements() |
org.openqa.selenium.NoSuchElementException |
getLastException() |
protected void |
isLoaded()
Determine whether or not the component is loaded.
|
protected void |
load()
When this method returns, the component modeled by the subclass should be fully loaded.
|
protected long |
sleepFor() |
get, isError
private org.openqa.selenium.NoSuchElementException lastException
private java.util.List<org.openqa.selenium.WebElement> elements
public SlowLoadingElementList(Clock clock, int timeOutInSeconds)
protected void load()
LoadableComponent
load
in class LoadableComponent<AjaxElementLocator.SlowLoadingElementList>
protected long sleepFor()
sleepFor
in class SlowLoadableComponent<AjaxElementLocator.SlowLoadingElementList>
protected void isLoaded() throws java.lang.Error
LoadableComponent
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
isLoaded
in class LoadableComponent<AjaxElementLocator.SlowLoadingElementList>
java.lang.Error
- when the page is not loaded.public org.openqa.selenium.NoSuchElementException getLastException()
public java.util.List<org.openqa.selenium.WebElement> getElements()