Namespace webdriver.until

code »

Classes

webdriver.until.Condition
Defines a condition to
Show:

Global Functions

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:

  1. A numeric index into window.frames for the currently selected frame.
  2. A webdriver.WebElement, which must reference a FRAME or IFRAME element on the current page.
  3. 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.

Parameters
frame: !(number|webdriver.WebElement|webdriver.Locator|webdriver.By.Hash|function(!webdriver.WebDriver): !webdriver.WebElement)
The frame identifier.
Returns
A new condition.

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.

Returns
The new condition.

Creates a condition that will wait for the given element to be disabled.

Parameters
element: !webdriver.WebElement
The element to test.
Returns
The new condition.

Creates a condition that will wait for the given element to be enabled.

Parameters
element: !webdriver.WebElement
The element to test.
Returns
The new condition.

Creates a condition that will wait for the given element to be deselected.

Parameters
element: !webdriver.WebElement
The element to test.
Returns
The new condition.

Creates a condition that will wait for the given element to be in the DOM, yet not visible to the user.

Parameters
element: !webdriver.WebElement
The element to test.
Returns
The new condition.

Creates a condition that will wait for the given element to be selected.

Parameters
element: !webdriver.WebElement
The element to test.
Returns
The new condition.

Creates a condition that will wait for the given element to become visible.

Parameters
element: !webdriver.WebElement
The element to test.
Returns
The new condition.

Creates a condition that will loop until an element is found with the given locator.

Parameters
locator: !(webdriver.Locator|webdriver.By.Hash|Function)
The locator to use.
Returns
The new condition.

Creates a condition that will wait for the given element's visible text to contain the given substring.

Parameters
element: !webdriver.WebElement
The element to test.
substr: string
The substring to search for.
Returns
The new condition.

Creates a condition that will wait for the given element's visible text to match the given text exactly.

Parameters
element: !webdriver.WebElement
The element to test.
text: string
The expected text.
Returns
The new condition.

Creates a condition that will wait for the given element's visible text to match a regular expression.

Parameters
element: !webdriver.WebElement
The element to test.
regex: !RegExp
The regular expression to test against.
Returns
The new condition.

Creates a condition that will loop until at least one element is found with the given locator.

Parameters
locator: !(webdriver.Locator|webdriver.By.Hash|Function)
The locator to use.
Returns
The new condition.

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.

Parameters
element: !webdriver.WebElement
The element that should become stale.
Returns
The new condition.

Creates a condition that will wait for the current page's title to contain the given substring.

Parameters
substr: string
The substring that should be present in the page title.
Returns
The new condition.

Creates a condition that will wait for the current page's title to match the given value.

Parameters
title: string
The expected page title.
Returns
The new condition.

Creates a condition that will wait for the current page's title to match the given regular expression.

Parameters
regex: !RegExp
The regular expression to test against.
Returns
The new condition.