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

Function titleContains

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

* Creates a condition that will wait for the current page's title to contain * the given substring. * * @param {string} substr The substring that should be present in the page * title. * @return {!Condition } The new condition.

(substr)

Source from the content-addressed store, hash-verified

150 * @return {!Condition<boolean>} The new condition.
151 */
152function titleContains(substr) {
153 return new Condition('for title to contain ' + JSON.stringify(substr), function (driver) {
154 return driver.getTitle().then(function (title) {
155 return title.indexOf(substr) !== -1
156 })
157 })
158}
159
160/**
161 * Creates a condition that will wait for the current page's title to match the

Callers

nothing calls this directly

Calls 1

getTitleMethod · 0.65

Tested by

no test coverage detected