| 程序包 | 说明 |
|---|---|
| org.openqa.selenium.support.ui |
| 限定符和类型 | 方法和说明 |
|---|---|
static ExpectedCondition<Alert> |
ExpectedConditions.alertIsPresent() |
static ExpectedCondition<Boolean> |
ExpectedConditions.and(ExpectedCondition<?>... conditions)
An expectation with the logical and condition of the given list of conditions.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.attributeContains(By locator,
String attribute,
String value)
An expectation for checking WebElement with given locator has attribute which contains specific
value
|
static ExpectedCondition<Boolean> |
ExpectedConditions.attributeContains(WebElement element,
String attribute,
String value)
An expectation for checking WebElement with given locator has attribute which contains specific
value
|
static ExpectedCondition<Boolean> |
ExpectedConditions.attributeToBe(By locator,
String attribute,
String value)
An expectation for checking WebElement with given locator has attribute with a specific value
|
static ExpectedCondition<Boolean> |
ExpectedConditions.attributeToBe(WebElement element,
String attribute,
String value)
An expectation for checking given WebElement has attribute with a specific value
|
static ExpectedCondition<Boolean> |
ExpectedConditions.attributeToBeNotEmpty(WebElement element,
String attribute)
An expectation for checking WebElement any non empty value for given attribute
|
static ExpectedCondition<Boolean> |
ExpectedConditions.elementSelectionStateToBe(By locator,
boolean selected) |
static ExpectedCondition<Boolean> |
ExpectedConditions.elementSelectionStateToBe(WebElement element,
boolean selected)
An expectation for checking if the given element is selected.
|
static ExpectedCondition<WebElement> |
ExpectedConditions.elementToBeClickable(By locator)
An expectation for checking an element is visible and enabled such that you can click it.
|
static ExpectedCondition<WebElement> |
ExpectedConditions.elementToBeClickable(WebElement element)
An expectation for checking an element is visible and enabled such that you can click it.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.elementToBeSelected(By locator) |
static ExpectedCondition<Boolean> |
ExpectedConditions.elementToBeSelected(WebElement element)
An expectation for checking if the given element is selected.
|
static ExpectedCondition<WebDriver> |
ExpectedConditions.frameToBeAvailableAndSwitchToIt(By locator)
An expectation for checking whether the given frame is available to switch to.
|
static ExpectedCondition<WebDriver> |
ExpectedConditions.frameToBeAvailableAndSwitchToIt(int frameLocator)
An expectation for checking whether the given frame is available to switch to.
|
static ExpectedCondition<WebDriver> |
ExpectedConditions.frameToBeAvailableAndSwitchToIt(String frameLocator)
An expectation for checking whether the given frame is available to switch to.
|
static ExpectedCondition<WebDriver> |
ExpectedConditions.frameToBeAvailableAndSwitchToIt(WebElement frameLocator)
An expectation for checking whether the given frame is available to switch to.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.invisibilityOfAllElements(List<WebElement> elements)
An expectation for checking all elements from given list to be invisible
|
static ExpectedCondition<Boolean> |
ExpectedConditions.invisibilityOfElementLocated(By locator)
An expectation for checking that an element is either invisible or not present on the DOM.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.invisibilityOfElementWithText(By locator,
String text)
An expectation for checking that an element with text is either invisible or not present on the
DOM.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.javaScriptThrowsNoExceptions(String javaScript)
An expectation to check if js executable
Usefull when you know, that there should be js val or something at the stage
|
static ExpectedCondition<Object> |
ExpectedConditions.jsReturnsValue(String javaScript)
An expectation for String value from javascript
|
static ExpectedCondition<Boolean> |
ExpectedConditions.not(ExpectedCondition<?> condition)
An expectation with the logical opposite condition of the given condition.
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.numberOfElementsToBe(By locator,
Integer number)
An expectation for checking number of WebElements with given locator
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.numberOfElementsToBeLessThan(By locator,
Integer number)
An expectation for checking number of WebElements with given locator being less than defined
number
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.numberOfElementsToBeMoreThan(By locator,
Integer number)
An expectation for checking number of WebElements with given locator
|
static ExpectedCondition<Boolean> |
ExpectedConditions.numberOfwindowsToBe(int expectedNumberOfWindows)
已过时。
please use
ExpectedConditions.numberOfWindowsToBe(int) instead |
static ExpectedCondition<Boolean> |
ExpectedConditions.numberOfWindowsToBe(int expectedNumberOfWindows) |
static ExpectedCondition<Boolean> |
ExpectedConditions.or(ExpectedCondition<?>... conditions)
An expectation with the logical or condition of the given list of conditions.
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.presenceOfAllElementsLocatedBy(By locator)
An expectation for checking that there is at least one element present on a web page.
|
static ExpectedCondition<WebElement> |
ExpectedConditions.presenceOfElementLocated(By locator)
An expectation for checking that an element is present on the DOM of a page.
|
static ExpectedCondition<WebElement> |
ExpectedConditions.presenceOfNestedElementLocatedBy(By locator,
By sub_locator)
An expectation for checking child WebElement as a part of parent element to present
|
static ExpectedCondition<WebElement> |
ExpectedConditions.presenceOfNestedElementLocatedBy(WebElement element,
By sub_locator)
An expectation for checking child WebElement as a part of parent element to be present
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.presenceOfNestedElementsLocatedBy(By locator,
By sub_locator)
An expectation for checking child WebElement as a part of parent element to present
|
static <T> ExpectedCondition<T> |
ExpectedConditions.refreshed(ExpectedCondition<T> condition)
Wrapper for a condition, which allows for elements to update by redrawing.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.stalenessOf(WebElement element)
Wait until an element is no longer attached to the DOM.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textMatches(By locator,
Pattern pattern)
An expectation for checking WebElement with given locator has text with a value as a part of
it
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textToBe(By locator,
String value)
An expectation for checking WebElement with given locator has specific text
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textToBePresentInElement(By locator,
String text)
已过时。
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textToBePresentInElement(WebElement element,
String text)
An expectation for checking if the given text is present in the specified element.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textToBePresentInElementLocated(By locator,
String text)
An expectation for checking if the given text is present in the element that matches the given
locator.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textToBePresentInElementValue(By locator,
String text)
An expectation for checking if the given text is present in the specified elements value
attribute.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.textToBePresentInElementValue(WebElement element,
String text)
An expectation for checking if the given text is present in the specified elements value
attribute.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.titleContains(String title)
An expectation for checking that the title contains a case-sensitive substring
|
static ExpectedCondition<Boolean> |
ExpectedConditions.titleIs(String title)
An expectation for checking the title of a page.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.urlContains(String fraction)
An expectation for the URL of the current page to contain specific text.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.urlMatches(String regex)
Expectation for the URL to match a specific regular expression
|
static ExpectedCondition<Boolean> |
ExpectedConditions.urlToBe(String url)
An expectation for the URL of the current page to be a specific url.
|
static ExpectedCondition<WebElement> |
ExpectedConditions.visibilityOf(WebElement element)
An expectation for checking that an element, known to be present on the DOM of a page, is
visible.
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.visibilityOfAllElements(List<WebElement> elements)
An expectation for checking that all elements present on the web page that match the locator
are visible.
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.visibilityOfAllElementsLocatedBy(By locator)
An expectation for checking that all elements present on the web page that match the locator
are visible.
|
static ExpectedCondition<WebElement> |
ExpectedConditions.visibilityOfElementLocated(By locator)
An expectation for checking that an element is present on the DOM of a page and visible.
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.visibilityOfNestedElementsLocatedBy(By locator,
By sub_locator)
An expectation for checking child WebElement as a part of parent element to be visible
|
static ExpectedCondition<List<WebElement>> |
ExpectedConditions.visibilityOfNestedElementsLocatedBy(WebElement element,
By sub_locator)
An expectation for checking child WebElement as a part of parent element to be visible
|
| 限定符和类型 | 方法和说明 |
|---|---|
static ExpectedCondition<Boolean> |
ExpectedConditions.and(ExpectedCondition<?>... conditions)
An expectation with the logical and condition of the given list of conditions.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.not(ExpectedCondition<?> condition)
An expectation with the logical opposite condition of the given condition.
|
static ExpectedCondition<Boolean> |
ExpectedConditions.or(ExpectedCondition<?>... conditions)
An expectation with the logical or condition of the given list of conditions.
|
static <T> ExpectedCondition<T> |
ExpectedConditions.refreshed(ExpectedCondition<T> condition)
Wrapper for a condition, which allows for elements to update by redrawing.
|