/// <summary> /// Waits for a <see cref="IWebElement"/> to not have specific text /// </summary> /// <param name="locator">The <see cref="By"/> locator of the <see cref="IWebElement"/></param> /// <param name="text">The text it should equal</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"/> text is not a match; otherwise, <see langword="false"/></returns> public static bool WaitUntilTextNotEquals(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.ElementTextNotEquals(locator, text), maxWaitTimeInSeconds)); }