WebDriverExpectedCondition
class WebDriverExpectedCondition (View source)
Canned ExpectedConditions which are generally useful within webdriver tests.
Methods
No description
No description
An expectation for checking the title of a page.
An expectation for checking substring of a page Title.
An expectation for checking that an element is present on the DOM of a page. This does not necessarily mean that the element is visible.
An expectation for checking that an element is present on the DOM of a page and visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
An expectation for checking that an element, known to be present on the DOM of a page, is visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
An expectation for checking that there is at least one element present on a web page.
An expectation for checking if the given text is present in the specified element.
An expectation for checking if the given text is present in the specified elements value attribute.
Expectation for checking if iFrame exists.
An expectation for checking that an element is either invisible or not present on the DOM.
An expectation for checking that an element with text is either invisible or not present on the DOM.
An expectation for checking an element is visible and enabled such that you can click it.
Wrapper for a condition, which allows for elements to update by redrawing.
An expectation for checking if the given element is selected.
An expectation for checking if the given element is selected.
An expectation for whether an alert() box is present.
An expectation with the logical opposite condition of the given condition.
Details
getApply()
No description
protected
__construct($apply)
No description
static bool
titleIs(string $title)
An expectation for checking the title of a page.
static bool
titleContains(string $title)
An expectation for checking substring of a page Title.
static WebDriverElement>
presenceOfElementLocated(WebDriverBy $by)
An expectation for checking that an element is present on the DOM of a page. This does not necessarily mean that the element is visible.
static WebDriverElement>
visibilityOfElementLocated(WebDriverBy $by)
An expectation for checking that an element is present on the DOM of a page and visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
static WebDriverElement>
visibilityOf(WebDriverElement $element)
An expectation for checking that an element, known to be present on the DOM of a page, is visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
static WebDriverExpectedCondition<array>
presenceOfAllElementsLocatedBy(WebDriverBy $by)
An expectation for checking that there is at least one element present on a web page.
static bool
textToBePresentInElement(WebDriverBy $by, string $text)
An expectation for checking if the given text is present in the specified element.
static bool
textToBePresentInElementValue(WebDriverBy $by, string $text)
An expectation for checking if the given text is present in the specified elements value attribute.
static WebDriver>
frameToBeAvailableAndSwitchToIt(string $frame_locator)
Expectation for checking if iFrame exists.
If iFrame exists switches driver's focus to the iFrame
static bool
invisibilityOfElementLocated(WebDriverBy $by)
An expectation for checking that an element is either invisible or not present on the DOM.
static bool
invisibilityOfElementWithText(WebDriverBy $by, string $text)
An expectation for checking that an element with text is either invisible or not present on the DOM.
static WebDriverElement>
elementToBeClickable(WebDriverBy $by)
An expectation for checking an element is visible and enabled such that you can click it.
static bool
stalenessOf(WebDriverElement $element)
Wait until an element is no longer attached to the DOM.
static WebDriverExpectedCondition<mixed>
refreshed(WebDriverExpectedCondition $condition)
Wrapper for a condition, which allows for elements to update by redrawing.
This works around the problem of conditions which have two parts: find an element and then check for some condition on it. For these conditions it is possible that an element is located and then subsequently it is redrawn on the client. When this happens a StaleElementReferenceException is thrown when the second part of the condition is checked.
static bool
elementToBeSelected(mixed $element_or_by)
An expectation for checking if the given element is selected.
static bool
elementSelectionStateToBe(mixed $element_or_by, bool $selected)
An expectation for checking if the given element is selected.
static WebDriverAlert>
alertIsPresent()
An expectation for whether an alert() box is present.
static mixed
not(WebDriverExpectedCondition $condition)
An expectation with the logical opposite condition of the given condition.