I am using WebDriver for automating regression suite of our webapp, I have tried to get my test scripts functioning with IE11 but have not had any success.
I understand IEDriverServer.exe does not currently support WebDriver and the issue requires cooperation from Microsoft, I have tried the steps outlined in responses to Selenium issue #6511.
(For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Inside this key, create a DWORD value named iexplore.exe with the value of 0.)
Protected mode settings are the same for all zones
Enhanced Protected Mode is disabled.
But still when I execute my automation scripts in IE11, It is opening browser and getting below Exception
org.openqa.selenium.ElementNotVisibleException: Received a JavaScript error attempting to
click on the element using synthetic events.We are assuming this is because the element
isn't displayed, but it may be due to other problems with executing JavaScript. (WARNING:
The server did not provide any stacktrace
information)
Can anyone please help me in how to solve this issue. I need to execute my automation scripts in IE11.
Version Details:
selenium-2.41.0
InternetExplorerDriver server (32-bit) 2.40.0.0
Windows 7 - 32 bit
It is a little bit tricky and annoying, but possible.
You already mentioned the IE settings that are needed. It also cache's the content between runs/usage and you would have to clear the cache and personal settings. I have found that the following helps ensure that the instance is clean when starting. These are options that will be passed into the IE instance when instantiating the WebDriver.
Local:
var options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
//Clean the session before launching the browser
options.EnsureCleanSession = true;
Remote:
capabilities = DesiredCapabilities.InternetExplorer();
capabilities.SetCapability("ie.ensureCleanSession", true);
Perhaps this as well as the IE security settings you mentioned might work for you.
Microsoft has released the IE11 web driver
http://www.microsoft.com/en-us/download/details.aspx?id=44069
update for 2017:
case "remote5555iexplorer" => {
println(" load web-driver: remote5555iexplorer")
val dc = DesiredCapabilities.internetExplorer()
dc.setJavascriptEnabled(true)
dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true)
dc.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true)
dc.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true)
dc.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);
remote = new RemoteWebDriver(new URL("http://localhost:5555/"), dc)
//remote = new InternetExplorerDriver(dc)
}
iexplorer: 11.0.9.9600.17843
update version: 11.0.20
libraryDependencies += "org.seleniumhq.selenium" % "selenium-ie-driver" % "3.3.1"
webdriver: IEDriverServer.exe 3.2.0.0 (64-bit)
command for run webdriver: IEDriverServer.exe /LOG-LEVEL=DEBUG
its all about desired capabilities .. use this line your desired capabilities for IE driver and it will not repeat again... and its worked for me..
ieCapabilities.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL,false);