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

Function elementTextContains

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

* Creates a condition that will wait for the given element's * webdriver.WebDriver#getText visible text to contain the given * substring. * * @param {!./webdriver.WebElement} element The element to test. * @param {string} substr The substring to search for. * @return {!WebElementCondit

(element, substr)

Source from the content-addressed store, hash-verified

384 * @see webdriver.WebDriver#getText
385 */
386function elementTextContains(element, substr) {
387 return new WebElementCondition('until element text contains', function () {
388 return element.getText().then((t) => (t.indexOf(substr) != -1 ? element : null))
389 })
390}
391
392/**
393 * 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