namespace webdriver.until
Functions
ableToSwitchToFrame(frame)code »
Creates a condition that will wait until the input driver is able to switch to the designated frame. The target frame may be specified as
- a numeric index into window.frames for the currently selected frame.
- a
webdriver.WebElement
, which must reference a FRAME or IFRAME element on the current page. - a locator which may be used to first locate a FRAME or IFRAME on the current page before attempting to switch to it.
Upon successful resolution of this condition, the driver will be left focused on the new frame.
webdriver.until.Condition<boolean>
A new condition.
alertIsPresent()code »
Creates a condition that waits for an alert to be opened. Upon success, the returned promise will be fulfilled with the handle for the opened alert.
webdriver.until.Condition<webdriver.Alert>
The new condition.
elementIsDisabled(element)code »
Creates a condition that will wait for the given element to be disabled.
- element
webdriver.WebElement
The element to test.
webdriver.until.Condition<boolean>
The new condition.
elementIsEnabled(element)code »
Creates a condition that will wait for the given element to be enabled.
- element
webdriver.WebElement
The element to test.
webdriver.until.Condition<boolean>
The new condition.
elementIsNotSelected(element)code »
Creates a condition that will wait for the given element to be deselected.
- element
webdriver.WebElement
The element to test.
webdriver.until.Condition<boolean>
The new condition.
elementIsNotVisible(element)code »
Creates a condition that will wait for the given element to be in the DOM, yet not visible to the user.
- element
webdriver.WebElement
The element to test.
webdriver.until.Condition<boolean>
The new condition.
elementIsSelected(element)code »
Creates a condition that will wait for the given element to be selected.
- element
webdriver.WebElement
The element to test.
webdriver.until.Condition<boolean>
The new condition.
elementIsVisible(element)code »
Creates a condition that will wait for the given element to become visible.
- element
webdriver.WebElement
The element to test.
webdriver.until.Condition<boolean>
The new condition.
elementLocated(locator)code »
Creates a condition that will loop until an element is
found
with the given locator.
webdriver.until.Condition<webdriver.WebElement>
The new condition.
elementTextContains(element, substr)code »
Creates a condition that will wait for the given element's
visible text
to contain the given
substring.
- element
webdriver.WebElement
The element to test.
- substr
string
The substring to search for.
webdriver.until.Condition<boolean>
The new condition.
elementTextIs(element, text)code »
Creates a condition that will wait for the given element's
visible text
to match the given
text
exactly.
- element
webdriver.WebElement
The element to test.
- text
string
The expected text.
webdriver.until.Condition<boolean>
The new condition.
elementTextMatches(element, regex)code »
Creates a condition that will wait for the given element's
visible text
to match a regular
expression.
- element
webdriver.WebElement
The element to test.
- regex
RegExp
The regular expression to test against.
webdriver.until.Condition<boolean>
The new condition.
elementsLocated(locator)code »
Creates a condition that will loop until at least one element is
found
with the given locator.
webdriver.until.Condition<Array<webdriver.WebElement>>
The new condition.
stalenessOf(element)code »
Creates a condition that will wait for the given element to become stale. An element is considered stale once it is removed from the DOM, or a new page has loaded.
- element
webdriver.WebElement
The element that should become stale.
webdriver.until.Condition<boolean>
The new condition.
titleContains(substr)code »
Creates a condition that will wait for the current page's title to contain the given substring.
- substr
string
The substring that should be present in the page title.
webdriver.until.Condition<boolean>
The new condition.
titleIs(title)code »
Creates a condition that will wait for the current page's title to match the given value.
- title
string
The expected page title.
webdriver.until.Condition<boolean>
The new condition.
titleMatches(regex)code »
Creates a condition that will wait for the current page's title to match the given regular expression.
- regex
RegExp
The regular expression to test against.
webdriver.until.Condition<boolean>
The new condition.
Types
- Condition
Defines a condition to