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

Function titleMatches

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

* Creates a condition that will wait for the current page's title to match the * given regular expression. * * @param {!RegExp} regex The regular expression to test against. * @return {!Condition } The new condition.

(regex)

Source from the content-addressed store, hash-verified

165 * @return {!Condition<boolean>} The new condition.
166 */
167function titleMatches(regex) {
168 return new Condition('for title to match ' + regex, function (driver) {
169 return driver.getTitle().then(function (title) {
170 return regex.test(title)
171 })
172 })
173}
174
175/**
176 * Creates a condition that will wait for the current page's url to match the

Callers

nothing calls this directly

Calls 2

getTitleMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected