Running Internet Explorer with selenium WebDriver.quit (); does not work

I run the following code and the browser does not close.

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

 public class _getPageIE {

 public static void main(String[] args) throws InterruptedException {

      DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
      capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);

      System.setProperty("webdriver.ie.driver", "C:\\WebDriver\\IEDriverServer.exe");
      WebDriver ieDriver = new InternetExplorerDriver(capabilities);

      ieDriver.manage().window().maximize();
      ieDriver.get("http://google.com");

      ieDriver.quit();
      System.out.println("end");
      }
 }

The browser opens and then maximizes and displays the Google page. Then System.out.printlin is executed and the program ends, but the browser remains open.

I am running Eclipse with Selenium 2.44 on Windows 8.1 64 bit with 64 bit IEDriverServer.exe.

The Console output is as follows.

Started InternetExplorerDriver server (64-bit)
2.44.0.0
Listening on port 46733
end

Any help is appreciated.

0
source share

All Articles