The below code works fine with Firefox and chrome but shows errors when executed in IE.
System.setProperty("webdriver.ie.driver", "G:\\Selenium\\IEDriver\\IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();
driver.get("https://www.google.co.in/?gws_rd=cr&ei=ZDziUrLDEuLpiAeD44H4BA");
driver.findElement(By.name("q")).sendKeys("Selenium");
The error displayed is I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed Jan 24, 2014 3:44:04 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute INFO: Retrying request Exception in thread "main" org.openqa.selenium.NoSuchElementException:
The problem was with my IE settings. The problem was resolved when the security settings in IE was changed to "Enable Protected Mode" for "Internet", "Local Intranet", "Trusted Sites" and "Restricted Sites". You can change it by going to Internet Options security tab and enable check box "Enable Protected Mode" for all the zones. I was able to get these information from the link http://jimevansmusic.blogspot.in/2012/08/youre-doing-it-wrong-protected-mode-and.html
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments