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

Function elementTextMatches

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

* Creates a condition that will wait for the given element's * webdriver.WebDriver#getText visible text to match a regular * expression. * * @param {!./webdriver.WebElement} element The element to test. * @param {!RegExp} regex The regular expression to test against. * @return {!WebEle

(element, regex)

Source from the content-addressed store, hash-verified

400 * @see webdriver.WebDriver#getText
401 */
402function elementTextMatches(element, regex) {
403 return new WebElementCondition('until element text matches', function () {
404 return element.getText().then((t) => (regex.test(t) ? element : null))
405 })
406}
407
408// PUBLIC API
409

Callers

nothing calls this directly

Calls 2

getTextMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected