1

I'm currently expanding my tests to cover Internet Explorer using Selenium webdriver for IE (IEDriverServer.exe).

My issue is that when I execute my tests using the IE webdriver. When I run the test, the Internet Explorer webdriver opens up and I can enter the address, but when it comes to actually executing the rest of the scripts (e.g. entering links, pressing various buttons and such) the test crashes due to time out.

NOTE: The tests execute as intended on Chrome and Firefox.

EDIT:

    try {           
driver.findElement(By.id("topmenuImg")).click();        
}       
    catch (NoSuchElementException ex) {             
JOptionPane.showMessageDialog(null, "Not possible");        
}
PE_8892
  • 35
  • 5
  • Which selenium and IE versions are you using? Thanks. – alecxe Jan 13 '15 at 07:39
  • I am using Selenium 2.44, IE 11. Thank you – PE_8892 Jan 13 '15 at 07:43
  • Please check this link out for properly configuring IE, in case if anything is missing out: [https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration](https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration) – Subh Jan 13 '15 at 09:57
  • I followed this configuration explanation before I posted my question, but thank you for the tip! – PE_8892 Jan 13 '15 at 13:22
  • Have you looked for IE11-specific causes, like the installation of Windows Update KB3025390. That update is known to [break the IE driver](http://jimevansmusic.blogspot.com/2014/12/windows-update-kb3025390-for-ie-11.html). – JimEvans Jan 13 '15 at 15:35
  • Hey Jim, my current update version is KB3008923. – PE_8892 Jan 14 '15 at 07:13

2 Answers2

1

IE Selenium

Use Desired Capabilities and disable the protection mode in IE-Browser

// Tomcat:apache-tomcat-7.0.37\webapps\ROOT\iedriver32\IEDriverServer.exe

String dreiverFromServer = "http://localhost:8088/iedriver32/IEDriverServer.exe"
File ietmp = File.createTempFile("iedriver", null).setExecutable(true);
FileUtils.copyURLToFile(new URL( dreiverFromServer ), ietmp);
System.setProperty("webdriver.ie.driver", ietmp.getAbsolutePath());
                     (OR)
System.setProperty("webdriver.ie.driver", "D:\\iedriver64\\IEDriverServer.exe");

DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
ieCapabilities.setCapability("ensureCleanSession", true);
ieCapabilities.setCapability("ignoreZoomSetting", true);
ieCapabilities.setCapability("ignoreProtectedModeSettings", true);
ieCapabilities.setCapability("ignore-certificate-error", true);
ieCapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

driver = new InternetExplorerDriver(ieCapabilities);

enter image description here

IE 11 to set a registry entry on the target computer so that driver can maintain a connection

Yash
  • 9,250
  • 2
  • 69
  • 74
1

Internet explorer is very slow when you ran your test in fire fox its worked fine because firefox search is very fast add proper waits and increase time out to locate objects increase that time to 2 min = 120 sec

C# example is

InternetExplorerDriver driver = new InternetExplorerDriver(@"c:\path", options, TimeSpan.FromMinutes(2));
fahad
  • 389
  • 2
  • 12