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

Function urlMatches

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

* Creates a condition that will wait for the current page's url 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

213 * @return {!Condition<boolean>} The new condition.
214 */
215function urlMatches(regex) {
216 return new Condition('for URL to match ' + regex, function (driver) {
217 return driver.getCurrentUrl().then(function (url) {
218 return regex.test(url)
219 })
220 })
221}
222
223/**
224 * Creates a condition that will loop until an element is

Callers

nothing calls this directly

Calls 2

getCurrentUrlMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected