|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.support.ui.ExpectedConditions
public class ExpectedConditions
Canned ExpectedCondition
s which are generally useful within webdriver
tests.
Method Summary | |
---|---|
static ExpectedCondition<Alert> |
alertIsPresent()
|
static ExpectedCondition<java.lang.Boolean> |
elementSelectionStateToBe(By locator,
boolean selected)
|
static ExpectedCondition<java.lang.Boolean> |
elementSelectionStateToBe(WebElement element,
boolean selected)
An expectation for checking if the given element is selected. |
static ExpectedCondition<WebElement> |
elementToBeClickable(By locator)
An Expectation for checking an element is visible and enabled such that you can click it. |
static ExpectedCondition<java.lang.Boolean> |
elementToBeSelected(By locator)
|
static ExpectedCondition<java.lang.Boolean> |
elementToBeSelected(WebElement element)
An expectation for checking if the given element is selected. |
static ExpectedCondition<WebDriver> |
frameToBeAvailableAndSwitchToIt(java.lang.String frameLocator)
An expectation for checking whether the given frame is available to switch to. |
static ExpectedCondition<java.lang.Boolean> |
invisibilityOfElementLocated(By locator)
An Expectation for checking that an element is either invisible or not present on the DOM. |
static ExpectedCondition<java.util.List<WebElement>> |
presenceOfAllElementsLocatedBy(By locator)
An expectation for checking that there is at least one element present on a web page. |
static ExpectedCondition<WebElement> |
presenceOfElementLocated(By locator)
An expectation for checking that an element is present on the DOM of a page. |
static ExpectedCondition<java.lang.Boolean> |
stalenessOf(WebElement element)
Wait until an element is no longer attached to the DOM. |
static ExpectedCondition<java.lang.Boolean> |
textToBePresentInElement(By locator,
java.lang.String text)
An expectation for checking if the given text is present in the specified element. |
static ExpectedCondition<java.lang.Boolean> |
textToBePresentInElementValue(By locator,
java.lang.String text)
An expectation for checking if the given text is present in the specified elements value attribute. |
static ExpectedCondition<java.lang.Boolean> |
titleContains(java.lang.String title)
An expectation for checking that the title contains a case-sensitive substring |
static ExpectedCondition<java.lang.Boolean> |
titleIs(java.lang.String title)
An expectation for checking the title of a page. |
static ExpectedCondition<WebElement> |
visibilityOf(WebElement element)
An expectation for checking that an element, known to be present on the DOM of a page, is visible. |
static ExpectedCondition<WebElement> |
visibilityOfElementLocated(By locator)
An expectation for checking that an element is present on the DOM of a page and visible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ExpectedCondition<java.lang.Boolean> titleIs(java.lang.String title)
title
- the expected title, which must be an exact match
public static ExpectedCondition<java.lang.Boolean> titleContains(java.lang.String title)
title
- the fragment of title expected
public static ExpectedCondition<WebElement> presenceOfElementLocated(By locator)
locator
- used to find the element
public static ExpectedCondition<WebElement> visibilityOfElementLocated(By locator)
locator
- used to find the element
public static ExpectedCondition<WebElement> visibilityOf(WebElement element)
element
- the WebElement
public static ExpectedCondition<java.util.List<WebElement>> presenceOfAllElementsLocatedBy(By locator)
locator
- used to find the element
public static ExpectedCondition<java.lang.Boolean> textToBePresentInElement(By locator, java.lang.String text)
public static ExpectedCondition<java.lang.Boolean> textToBePresentInElementValue(By locator, java.lang.String text)
public static ExpectedCondition<WebDriver> frameToBeAvailableAndSwitchToIt(java.lang.String frameLocator)
If the frame is available it switches the given driver to the specified frame.
public static ExpectedCondition<java.lang.Boolean> invisibilityOfElementLocated(By locator)
locator
- used to find the elementpublic static ExpectedCondition<WebElement> elementToBeClickable(By locator)
public static ExpectedCondition<java.lang.Boolean> stalenessOf(WebElement element)
element
- The element to wait for.
public static ExpectedCondition<java.lang.Boolean> elementToBeSelected(WebElement element)
public static ExpectedCondition<java.lang.Boolean> elementSelectionStateToBe(WebElement element, boolean selected)
public static ExpectedCondition<java.lang.Boolean> elementToBeSelected(By locator)
public static ExpectedCondition<java.lang.Boolean> elementSelectionStateToBe(By locator, boolean selected)
public static ExpectedCondition<Alert> alertIsPresent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |