/// <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="uriPartial"> /// <inheritdoc cref="Uri.GetLeftPart(UriPartial)" /> /// </param> /// <param name="condition">The <see cref="Func{T,TResult}" />, that defines the condition until the browser must wait.</param> /// <exception cref="WebDriverTimeoutException"></exception> public static TResult UntilUrlLeftPart <TResult>( [NotNull] this WebDriverWait wait, UriPartial uriPartial, [NotNull] Func <string, TResult> condition) { if (wait == null) { throw new ArgumentNullException(nameof(wait)); } if (condition == null) { throw new ArgumentNullException(nameof(condition)); } wait.Message += " Waited for " + "loaded url's left part " + "to meet the given condition."; return(wait.Until(WebDriverWaitConditions.UrlLeftPart(uriPartial, condition))); }