MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / elementTextIs

Function elementTextIs

javascript/selenium-webdriver/lib/until.js:370–374  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

368 * @see webdriver.WebDriver#getText
369 */
370function 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

Callers

nothing calls this directly

Calls 1

getTextMethod · 0.65

Tested by

no test coverage detected