* Creates a condition that will wait for the given element to be enabled. * * @param {!./webdriver.WebElement} element The element to test. * @return {!WebElementCondition} The new condition. * @see webdriver.WebDriver#isEnabled
(element)
| 312 | * @see webdriver.WebDriver#isEnabled |
| 313 | */ |
| 314 | function elementIsEnabled(element) { |
| 315 | return new WebElementCondition('until element is enabled', function () { |
| 316 | return element.isEnabled().then((v) => (v ? element : null)) |
| 317 | }) |
| 318 | } |
| 319 | |
| 320 | /** |
| 321 | * Creates a condition that will wait for the given element to be disabled. |