-
Method Summary
Modifier and Type |
Method |
Description |
default boolean |
forAlert() |
wait for alert to be present
|
default org.openqa.selenium.WebElement |
forClickability(org.openqa.selenium.By by) |
wait for element to be clickable
|
default org.openqa.selenium.WebElement |
forConditions(org.openqa.selenium.By by,
SelectorWaitCondition... waitConditions) |
|
default org.openqa.selenium.WebElement |
forEnabled(org.openqa.selenium.By by,
boolean isEnabled) |
wait for element to be enabled
|
default void |
forInvisibility(org.openqa.selenium.By by) |
wait for element to be invisible
|
default org.openqa.selenium.WebElement |
forKeyable(org.openqa.selenium.By by) |
Query WebElement using selector; ensure element can have keys sent to it
|
default org.openqa.selenium.WebElement |
forNotStale(org.openqa.selenium.By by) |
wait for element to not be stale
|
default boolean |
forPageLoad() |
wait for page-load-state to be 'complete'
|
default boolean |
forPageState(java.lang.String desiredState) |
wait for page-load-state to be `desiredState`
|
default org.openqa.selenium.WebElement |
forPresence(org.openqa.selenium.By by) |
wait for element to be present
|
default java.util.List<org.openqa.selenium.WebElement> |
forPresences(org.openqa.selenium.By by) |
get result-set of specified by-selector; wait for presence of all elements in result set
|
default boolean |
forUrlToContain(java.lang.String... partUrls) |
wait for address bar's url to match one of the specified urls
|
default java.util.List<org.openqa.selenium.WebElement> |
forVisibilities(org.openqa.selenium.By by) |
wait for all specified elements to be visible
|
default org.openqa.selenium.WebElement |
forVisibility(org.openqa.selenium.By by) |
wait for element to be visible
|
org.openqa.selenium.WebDriver |
getDriver() |
|
int |
getWaitSeconds() |
|
default boolean |
isDisplayed(org.openqa.selenium.WebElement we) |
check if element is displaed & handle potential exception
|
default boolean |
isEnabled(org.openqa.selenium.WebElement we) |
check if element is enabled & handle potential exception
|
default <T> boolean |
until(int waitSeconds,
com.google.common.base.Function<org.openqa.selenium.WebDriver,T> condition) |
wait for specified condition to return true
|
-
Method Details
-
-
org.openqa.selenium.WebDriver getDriver()
-
default org.openqa.selenium.WebElement forEnabled(org.openqa.selenium.By by,
boolean isEnabled)
wait for element to be enabled
- Parameters:
by
- selector used to query for element on DOM
isEnabled
- desired enabledness
- Returns:
- element if enabled state matches desired enabledness within specified wait-time
-
default org.openqa.selenium.WebElement forVisibility(org.openqa.selenium.By by)
wait for element to be visible
- Parameters:
by
- selector used to query for element on DOM
- Returns:
- element if visible within specified wait-time
-
default void forInvisibility(org.openqa.selenium.By by)
wait for element to be invisible
- Parameters:
by
- selector used to query for element on DOM
-
default org.openqa.selenium.WebElement forClickability(org.openqa.selenium.By by)
wait for element to be clickable
- Parameters:
by
- selector used to query for element on DOM
- Returns:
- element if clickable within specified wait-time
-
default org.openqa.selenium.WebElement forPresence(org.openqa.selenium.By by)
wait for element to be present
- Parameters:
by
- selector used to query for element on DOM
- Returns:
- element if present within specified wait-time
-
default org.openqa.selenium.WebElement forNotStale(org.openqa.selenium.By by)
wait for element to not be stale
- Parameters:
by
- selector used to query for element on DOM
- Returns:
- element if not stale within specified wait-time
-
default boolean forAlert()
wait for alert to be present
- Returns:
- element if alert is present within specified wait-time
-
default boolean forUrlToContain(java.lang.String... partUrls)
wait for address bar's url to match one of the specified urls
- Parameters:
partUrls
- the urls to check against
- Returns:
- true if url contains at least one of the specified urls
-
default java.util.List<org.openqa.selenium.WebElement> forVisibilities(org.openqa.selenium.By by)
wait for all specified elements to be visible
- Parameters:
by
- selector used to query elements on DOM
- Returns:
- List of queried elements
-
default java.util.List<org.openqa.selenium.WebElement> forPresences(org.openqa.selenium.By by)
get result-set of specified by-selector; wait for presence of all elements in result set
- Parameters:
by
- selector used to query for element on DOM
- Returns:
- List of queried elements
-
default boolean forPageLoad()
wait for page-load-state to be 'complete'
- Returns:
- true if page's load state was 'complete' within specified wait-time
-
default boolean forPageState(java.lang.String desiredState)
wait for page-load-state to be `desiredState`
- Parameters:
desiredState
- desired state of page
- Returns:
- true if page's load state was desired state within specified wait-time
-
default org.openqa.selenium.WebElement forKeyable(org.openqa.selenium.By by)
Query WebElement using selector; ensure element can have keys sent to it
- Parameters:
by
- selector used to query element on DOM
- Returns:
- respective WebElement
-
default org.openqa.selenium.WebElement forConditions(
org.openqa.selenium.By by,
SelectorWaitCondition... waitConditions)
- Parameters:
by
- selector used to query element on DOM
waitConditions
- variable number of string representations of wait conditions
- Returns:
- respective browserHandler element
-
default <T> boolean until(int waitSeconds,
com.google.common.base.Function<org.openqa.selenium.WebDriver,T> condition)
wait for specified condition to return true
- Type Parameters:
T
-
- Parameters:
condition
- condition to wait for
- Returns:
- true if condition is true within specified wait seconds
-
default boolean isEnabled(org.openqa.selenium.WebElement we)
check if element is enabled & handle potential exception
- Parameters:
we
- element to check enabledness of
- Returns:
- true if element is enabled
-
default boolean isDisplayed(org.openqa.selenium.WebElement we)
check if element is displaed & handle potential exception
- Parameters:
we
- element to check display of
- Returns:
- true if element is display