You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
Description
--
I have ran into a situation where I need to wait for an expected condition for more
than 3 minutes (at times up to 1.5 hours). When using WebDriverWait, no matter what
I set the timeout to, it throws an exception after 60 seconds every time.
What steps will reproduce the problem?
--
1. Create WebDriverWait object with a time greater than 60 seconds.
2. Perform the wait on an ExpectedCondition.ElementExists(By)
3. Execute test
What is the expected output? What do you see instead?
--
It should throw the exception after 2 minutes. Instead it is throwing the exception
after 60 seconds.
Selenium version: 2.26.0
OS: Windows 7 Enterprise
Browser: Firefox
Browser version: 17
I also tried setting the implicit wait to 2 minutes and just using a driver.FindElement
and it also threw an exception after 60 seconds. Below is a sample demonstrating this
behavior.
IWebDriver driver = new FirefoxDriver();
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromMinutes(2));
Console.Out.WriteLine("Start: " + DateTime.Now);
try {
IWebElement e = wait.Until<IWebElement>(ExpectedConditions.ElementExists(By.Id("null")));
} catch(Exception ex) {
Console.Out.WriteLine(ex.Message);
}
Console.Out.WriteLine("End: " + DateTime.Now);
driver.Quit();
Reported by Daniel.Dale.Armstrong on 2012-12-05 17:09:00
The text was updated successfully, but these errors were encountered:
Each driver class has a constructor overload that allows you to set the timeout for
each command. Here is an example for the FirefoxDriver to set the command timeout to
5 minutes:
IWebDriver driver = new FirefoxDriver(new FirefoxBinary(), null, TimeSpan.FromMinutes(5));
You can find similar constructor overloads for InternetExplorerDriver, ChromeDriver,
and RemoteWebDriver.
Reported by james.h.evans.jr on 2012-12-05 17:20:45
When using these constructors it appears that the WebDriverWait is overridden.
IWebDriver driver = new FirefoxDriver(new FirefoxBinary(), null, TimeSpan.FromHours(2));
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromMinutes(2));
...
This caused it to wait for 2 hours rather than two minutes. Is this the expected behavior?
Reported by Daniel.Dale.Armstrong on 2012-12-05 18:50:19
Originally reported on Google Code with ID 4874
Reported by
Daniel.Dale.Armstrong
on 2012-12-05 17:09:00The text was updated successfully, but these errors were encountered: