SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

IE10 hangs after downloading file with ready state 'interactive' #6305

Open lukeis opened 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 6305

After clicking on a link that triggers a download in IE10 (and a notification bar to
appear at the bottom), the click() call hangs forever and the server complains that
the ready state is not 'complete'.

What steps will reproduce the problem?
1. Click link or button to start file download
2. Notification bar pops up at the bottom of the window asking "Do you want to open
or save..."
3. Save the file and dismiss the bar manually or using automated keystrokes
4. The click() call hangs forever. Debug from the server says the browser's ready state
is not 'Complete'.

I would expect to be able to save the file using keystrokes sent from a script or manually,
and have the click() call return afterward. Instead, it hangs forever waiting for ready
state complete.

Selenium version: 2.35
OS: Windows 7
Browser: IE
Browser version: 10
Using IEDriverServer_Win32_2.35.3

I compiled a version of IEDriverServer with some extra debug and found that according
to IEDriverServer, the ready state was forever stuck in 'interactive' after dismissing
the notification bar. However, when I would open the Javascript debugger in the active
window and type 'document.readyState', it would usually return 'Complete'. Sometimes
it would also return 'interactive', but usually 'Complete'. I'm not sure why these
values wouldn't be in sync.

Here's some code that will cause the problem on my machine:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;

public class DownloadFail {
    private static WebDriver driver = null;

    public static void main(String[] args) throws Exception {
        System.setProperty("webdriver.ie.driver", "src/main/resources/webdrivers/IEDriverServer.exe");
        DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
        capabilities.setCapability(InternetExplorerDriver.LOG_LEVEL, "TRACE");
        capabilities.setCapability(InternetExplorerDriver.LOG_FILE, "output.log");
        driver = new InternetExplorerDriver(capabilities);
        driver.get("http://www.microsoft.com/en-us/download/details.aspx?id=18698");
        driver.findElement(By.xpath("//span[.='Download']")).click();
    }
}

Reported by adaniels085 on 2013-09-22 03:05:30


lukeis commented 8 years ago

Reported by barancev on 2013-10-20 20:35:05

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 17:45:55