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 current page title matches the given regular expression.
An expectation for checking the URL of a page.
An expectation for checking substring of the URL of a page.
An expectation for checking current page URL matches the given regular expression.
An expectation for checking that an element is present on the DOM of a page.
An expectation for checking that there is at least one element present on a web page.
An expectation for checking that an element is present on the DOM of a page and visible.
An expectation for checking than at least one element in an array of elements is present on the DOM of a page and visible.
An expectation for checking that an element, known to be present on the DOM of a page, is visible.
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 element.
An expectation for checking if the given text exactly equals the text in specified element.
An expectation for checking if the given regular expression matches the text in specified element.
An expectation for checking if the given text is present in the specified elements value attribute.
An expectation for checking if the given text is present in the specified elements value attribute.
Expectation for checking if iFrame exists. If iFrame exists switches driver's focus to the iFrame.
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 checking the number of opened windows.
An expectation with the logical opposite condition of the given condition.
Details
        
                    protected        
    __construct(callable $apply)
        
    
    No description
        
                            callable
    getApply()
        
    
    No description
        
                static            WebDriverExpectedCondition
    titleIs(string $title)
        
    
    An expectation for checking the title of a page.
        
                static            WebDriverExpectedCondition
    titleContains(string $title)
        
    
    An expectation for checking substring of a page Title.
        
                static            WebDriverExpectedCondition
    titleMatches(string $titleRegexp)
        
    
    An expectation for checking current page title matches the given regular expression.
        
                static            WebDriverExpectedCondition
    urlIs(string $url)
        
    
    An expectation for checking the URL of a page.
        
                static            WebDriverExpectedCondition
    urlContains(string $url)
        
    
    An expectation for checking substring of the URL of a page.
        
                static            WebDriverExpectedCondition
    urlMatches(string $urlRegexp)
        
    
    An expectation for checking current page URL matches the given regular expression.
        
                static            WebDriverExpectedCondition
    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            WebDriverExpectedCondition
    presenceOfAllElementsLocatedBy(WebDriverBy $by)
        
    
    An expectation for checking that there is at least one element present on a web page.
        
                static            WebDriverExpectedCondition
    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            WebDriverExpectedCondition
    visibilityOfAnyElementLocated(WebDriverBy $by)
        
    
    An expectation for checking than at least one element in an array of elements 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            WebDriverExpectedCondition
    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
    textToBePresentInElement(WebDriverBy $by, string $text)
        deprecated
    
    deprecated
An expectation for checking if the given text is present in the specified element.
To check exact text match use elementTextIs() condition.
        
                static            WebDriverExpectedCondition
    elementTextContains(WebDriverBy $by, string $text)
        
    
    An expectation for checking if the given text is present in the specified element.
To check exact text match use elementTextIs() condition.
        
                static            WebDriverExpectedCondition
    elementTextIs(WebDriverBy $by, string $text)
        
    
    An expectation for checking if the given text exactly equals the text in specified element.
To check only partial substring of the text use elementTextContains() condition.
        
                static            WebDriverExpectedCondition
    elementTextMatches(WebDriverBy $by, string $regexp)
        
    
    An expectation for checking if the given regular expression matches the text in specified element.
        
                static            WebDriverExpectedCondition
    textToBePresentInElementValue(WebDriverBy $by, string $text)
        deprecated
    
    deprecated
An expectation for checking if the given text is present in the specified elements value attribute.
        
                static            WebDriverExpectedCondition
    elementValueContains(WebDriverBy $by, string $text)
        
    
    An expectation for checking if the given text is present in the specified elements value attribute.
        
                static            WebDriverExpectedCondition
    frameToBeAvailableAndSwitchToIt(string $frame_locator)
        
    
    Expectation for checking if iFrame exists. If iFrame exists switches driver's focus to the iFrame.
        
                static            WebDriverExpectedCondition
    invisibilityOfElementLocated(WebDriverBy $by)
        
    
    An expectation for checking that an element is either invisible or not present on the DOM.
        
                static            WebDriverExpectedCondition
    invisibilityOfElementWithText(WebDriverBy $by, string $text)
        
    
    An expectation for checking that an element with text is either invisible or not present on the DOM.
        
                static            WebDriverExpectedCondition
    elementToBeClickable(WebDriverBy $by)
        
    
    An expectation for checking an element is visible and enabled such that you can click it.
        
                static            WebDriverExpectedCondition
    stalenessOf(WebDriverElement $element)
        
    
    Wait until an element is no longer attached to the DOM.
        
                static            WebDriverExpectedCondition
    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            WebDriverExpectedCondition
    elementToBeSelected(mixed $element_or_by)
        
    
    An expectation for checking if the given element is selected.
        
                static            WebDriverExpectedCondition
    elementSelectionStateToBe(mixed $element_or_by, bool $selected)
        
    
    An expectation for checking if the given element is selected.
        
                static            WebDriverExpectedCondition
    alertIsPresent()
        
    
    An expectation for whether an alert() box is present.
        
                static            WebDriverExpectedCondition
    numberOfWindowsToBe(int $expectedNumberOfWindows)
        
    
    An expectation checking the number of opened windows.
        
                static            mixed
    not(WebDriverExpectedCondition $condition)
        
    
    An expectation with the logical opposite condition of the given condition.