I downloaded the driver and I gave the exact path in my code but when I ran the code it shows me error
my code with java is as below:
System.out.println("Internet Explorer is selected");
System.setProperty("webdriver.ie.driver","C:\\Program Files\\Selenium\\Drivers\\IEDriver\\IEDriverServer.exe");
driver = new InternetExplorerDriver();
selenium = new WebDriverBackedSelenium(driver, "http://www.datamoat.com/");
and the error message is
org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.15 seconds
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
System info: host: 'SAKIB-PC', ip: '192.168.10.70', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_25'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
First download the exe file of the IEDriverServer (64 bit and 32 bit). Don't need to install, only download this file with your browser( 64 or 32 bit) and simply give the path of the exe file in the given code.
http://www.seleniumhq.org/download/
use this code
Below steps are worked for me, Hope this will work for you as well,
then write below code in a java file and run
I've been firefighting with this issue for the past one month. And finally I found a fruitful solution. Here are the exact steps which we followed to get it worked. I have already done Required Configuration as mentioned in this link: https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration
Use these Desired Capabilities for your internet explorer driver
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true); webDriver = new InternetExplorerDriver(capabilities);
Use appropriate selenium version 2.53.1. I got it worked for the selenium version as mentioned in pom
Download the IEDriverServer_x64_2.53.1.zip from the below link. Make sure its 2.53.1 http://selenium-release.storage.googleapis.com/index.html?path=2.53/
Now go to registry settings
(regedit.exe)
for the current user (Don't openregedit
as an Administrator) and add TabProcGrowth for the below path in regeditHKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
Right click on Main and add new DWORD (32 bit) and make it as 0. Remember I tried 64 bit with QWORD it didn't worked for me.
The key in this process is Step 2 which is Install IE Webdriver tool for windows
I didn't tried this method for Selenium latest version 3.0 but will give a try.
In c#, This can bypass changing protected zone settings.
Go to Tools -> Internet Options -> Security and Enable protection mode for all zones. It worked for me :)