MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / elementTextMatches

Function elementTextMatches

javascript/selenium-webdriver/lib/until.js:400–404  ·  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

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

Callers

nothing calls this directly

Calls 2

getTextMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected