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

Function titleMatches

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

167 * @return {!Condition<boolean>} The new condition.
168 */
169function titleMatches(regex) {
170 return new Condition('for title to match ' + regex, function (driver) {
171 return driver.getTitle().then(function (title) {
172 return regex.test(title)
173 })
174 })
175}
176
177/**
178 * 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