* 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)
| 213 | * @return {!Condition<boolean>} The new condition. |
| 214 | */ |
| 215 | function 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 |
nothing calls this directly
no test coverage detected