Now that ExpectedConditions
is deprecated and I can't use ExpectedConditions.InvisibilityOfElementLocated
to determine that a modal dialog has closed, is there a built-in easy way to determine that a modal dialog has closed using Selenium and C#?
public static void WaitForModalToClose(IWebDriver driver, int timeoutSec = 15)
{
WebDriverWait wait = new WebDriverWait(driver, new TimeSpan(0, 0, timeoutSec));
wait.Until(ExpectedConditions.InvisibilityOfElementLocated(modal.getBy());
}
This gives me a deprecated warning.