This question is regarding Selenium WebDriver running on Internet Explorer.
On Internet Explorer, the vary basic selenium method that is click()
does not works most the of the time.
This is my code:
System.setProperty("webdriver.ie.driver", "<path_to_iedriverserver>");
DesiredCapabilities d = DesiredCapabilities.internetExplorer();
//d.setCapability("nativeEvents", false);
webdriver = new InternetExplorerDriver(d);
webdriver.get("http://google.co.uk");
webdriver.findElement(By.linkText("Images")).click();
webdriver.findElement(By.linkText("Search")).click();
This script usually clicks "Images" link successfully, but in some cases it fails to click "Search" afterwards. It is not a synchronization issue, the same issue happens when there is a, say, Thread. Sleep()
between the clicks. Moreover, if script is stopped at the breakpoint after this code and user tries to click links manually, it does not work either, but URL's keep flashing in the Internet Explorer status bar as if some click event was not completely handled. When IEDriverServer.exe
process is killed, this browser window becomes responsive again.
This is my system information:
Selenium version: 4.42.2
OS: Windows 7
Browser: IE 9, IEDriverServer_Win32_2.42.0,