/// <summary> /// Waits for a <see cref="IWebElement"/> to not contain specific text /// </summary> /// <param name="locator">The <see cref="By"/> locator of the <see cref="IWebElement"/></param> /// <param name="text">The text it should contain</param> /// <param name="maxWaitTimeInSeconds">Maximum amount of seconds as <see cref="int"/> to wait for the <see cref="IWebElement"/> to become visible</param> /// <returns><see langword="true"/> if the <see cref="IWebElement"/> not contains the text; otherwise, <see langword="false"/></returns> public static bool WaitUntilTextNotContains(this ISearchContext iSearchContext, By locator, string text, int maxWaitTimeInSeconds = GlobalConstants.MaxWaitTimeInSeconds) { if (!iSearchContext.WaitUntilExists(locator, maxWaitTimeInSeconds)) { Console.WriteLine("Element did not exist, could not compare text of element with locator: {0}", locator); return(false); } return(iSearchContext.WaitUntil(ExpectedCondition.ElementTextNotContains(locator, text), maxWaitTimeInSeconds)); }