fix: add until.urlContains null value check
`driver.getCurrentUrl()` can return `null` in some cases, which causes
a `TypeError` instead of continuing to retry for the expected time.
@@ -205,7 +205,7 @@ exports.urlContains = function urlContains(substrUrl) {
'for URL to contain ' + JSON.stringify(substrUrl),
function(driver) {
return driver.getCurrentUrl().then(function(url) {
- return url.indexOf(substrUrl) !== -1;
+ return url && url.indexOf(substrUrl) !== -1;
});
});
};
