ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

PageLoadTimeout ignored when setting Url #907

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
C# bindings API states that PageLoadTimeout 
"Specifies the amount of time the driver should wait for a page to load when 
setting the Url property." - 
http://selenium.googlecode.com/git/docs/api/dotnet/html/M_OpenQA_Selenium_ITimeo
uts_SetPageLoadTimeout.htm

This however doesn't seem to be the case.

var dc = (DesiredCapabilities)new ChromeOptions().ToCapabilities();
var driver = new RemoteWebDriver(new Uri("http://192.168.1.100:4444/wd/hub"), 
dc, TimeSpan.FromSeconds(90));
driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(30));
var stopWatch = new Stopwatch();
stopWatch.Start();
driver.Url = "http://localhost/test.html";
stopWatch.Stop();
Console.Out.WriteLine("Elapsed time: " + stopWatch.Elapsed);

In the above example (see the attached test.html which simply delays the 
DOMContentLoadedEventEnd for 5min) Url setter will block for 90 seconds and not 
for the expected 30 seconds.

In fact I couldn't find anything that would be affected by PageLoadTimeout. 
Navigate().GoToUrl() doesn't seem to be affected by it either.

Selenium 2.42.2, .NET bindings 2.43.1, Chromedriver 2.10. Chrome 37.0.2062.3. 
Linux.

Original issue reported on code.google.com by rom...@gmail.com on 23 Sep 2014 at 4:43

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18