I have a method which waits explicitly until the element exists. It was working fine until I upgraded my driver to 2.37. The problem is even though I pass timeout parameter in my method, it doesn't seem to wait that long, instead it throws the "elementNotFound" exception. I believe it is still using the default webdriver's timeout. Below is the code I am using in my method ( this is not my original code, I grabbed it from stackoverflow). I even tried TimeSpanFromMInutes and it doesn't seem to wait that long. Has something got broken in 2.37?
public static IWebElement FindElement(this IWebDriver driver, By by, int timeoutInSeconds)
{
if (timeoutInSeconds > 0)
{
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(timeoutInSeconds));
wait.IgnoreExceptionTypes(typeof(NoSuchElementException));
return wait.Until(drv => drv.FindElement(by));
}
return driver.FindElement(by);
}`