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

Function titleContains

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

152 * @return {!Condition<boolean>} The new condition.
153 */
154function titleContains(substr) {
155 return new Condition('for title to contain ' + JSON.stringify(substr), function (driver) {
156 return driver.getTitle().then(function (title) {
157 return title.indexOf(substr) !== -1
158 })
159 })
160}
161
162/**
163 * 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