I have no implicit waits set up at all. I run the following code:
try
{
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5));
var something = wait.Until(ExpectedConditions.ElementIsVisible(By.Name("__CONFIRM__")));
}
catch (Exception ex)
{
var something = ex.Message;
}
The exception is thrown after 60 seconds, not 5 seconds. Is there some default implicit wait I need to clear first?
Having gone through the documentation for Selenium, I know you shouldn't mix implicit and explicit waits, but I am sure I am not doing that here?
So turns out that because in some instances the window the driver is running in is closed, the driver wasn't finding what it should and was timing out after the implicit 60 seconds built in.
Pro Tip: if the window can close, be sure to detect this and use the Driver.SwitchTo()... Function to get you out of a jam