Step:1
WebDriver wd = new FirefoxDriver();
//Removed this code after stackoverflow suggestion in comments
//wd.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
wd.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);
wd.get("http:\\some url");
Step:2
(new WebDriverWait(wd, 5)).until(ExpectedConditions.
presenceOfElementLocated(By.name("some name")));
Step:3
Some code going on......
I debug the above code, and the step 2 reached. But the step 3 is not reached after the given time out 5 seconds in any case. It is getting blocked until the page loaded fully.
The By.name("some name") is in the start of the page source.
But if i stop the browser manually from loading with in 15 seconds, then the step 3 is getting reached. So how the timeout 5 seconds is getting used here. And is there any way to reach step 3 with out manual stop or before the page load fully.?
I am using selenium 2.46.0 library and firefox 28. And also checked with firefox version 35,36 & 37
The url takes at least 4 minutes to load fully in the internet connection which i am using
Please let me know if any additional details needed.
Thanks in advance.