/// <summary> /// Waits, until the browser's loaded Url should not contain the given value. /// </summary> /// <param name="wait">The <see cref="WebDriverWait" /> instance, that is used to command the browser for wait.</param> /// <param name="urlPart">The URL part the browser is currently displaying.</param> /// <exception cref="WebDriverTimeoutException"></exception> public static bool UntilUrlNotContains( [NotNull] this WebDriverWait wait, [NotNull] string urlPart) { if (wait == null) { throw new ArgumentNullException(nameof(wait)); } if (urlPart == null) { throw new ArgumentNullException(nameof(urlPart)); } wait.Message += " Waited for " + "loaded url " + $"not to contain ({urlPart})"; return(wait.Until(WebDriverWaitConditions.UrlNotToContain(urlPart))); }