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

Function urlIs

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

* Creates a condition that will wait for the current page's url to match the * given value. * * @param {string} url The expected page url. * @return {!Condition } The new condition.

(url)

Source from the content-addressed store, hash-verified

180 * @return {!Condition<boolean>} The new condition.
181 */
182function urlIs(url) {
183 return new Condition('for URL to be ' + JSON.stringify(url), function (driver) {
184 return driver.getCurrentUrl().then(function (u) {
185 return u === url
186 })
187 })
188}
189
190/**
191 * Creates a condition that will wait for the current page's url to contain

Callers

nothing calls this directly

Calls 1

getCurrentUrlMethod · 0.65

Tested by

no test coverage detected