I\'m trying to run tests on Internet Explorer 11 working with Selenium WebDriver. The code is:
System.setProperty(\"webdriver.ie.driver\", \"Path/to//IEDrive
I faced the same issue after going through every possible solution finally I got the answer.Try this it will definitely solve your problem as well.
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "IE");
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);
System.setProperty("webdriver.ie.driver","C://MavenTest//driver//IEDriverServer.exe");
driver = new InternetExplorerDriver();