* Creates a condition that will wait for the given element's * webdriver.WebDriver#getText visible text to match the given * text exactly. * * @param {!./webdriver.WebElement} element The element to test. * @param {string} text The expected text. * @return {!WebElementCondition
(element, text)
| 368 | * @see webdriver.WebDriver#getText |
| 369 | */ |
| 370 | function elementTextIs(element, text) { |
| 371 | return new WebElementCondition('until element text is', function () { |
| 372 | return element.getText().then((t) => (t === text ? element : null)) |
| 373 | }) |
| 374 | } |
| 375 | |
| 376 | /** |
| 377 | * Creates a condition that will wait for the given element's |