I am trying to launch IE11 browser on my local machine using the following code.
try{System.setProperty("webdriver.ie.driver", "src/main/resources/bin/IEDriverServer.exe");
}
catch (Exception ex){
Reporter.log("\nException in getting and setting the webdriver IE driver: "+ ex.getMessage() + ex.getClass(),true);
ex.printStackTrace();
}
WebDriverManager.browser = browser;
driver = new EventFiringWebDriver(new InternetExplorerDriver());
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
When I run the code, it brings up the browser with http://localhost:22414/ and fails to load there after. Attaching the logs below.
org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 125%. It should be set to 100% (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.16 seconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'AAAAAA', ip: '123.123.123.123', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.7.0_79'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
I manually tried setting the browser zoom level to 100%. Even then the error appears.
This is working fine for me. Ingore that zoom level.
private static InternetExplorerOptions IeSettings()
{
var options = new InternetExplorerOptions();
options.IgnoreZoomLevel = true;
return options;
}
public static IWebDriver ieDriver = new InternetExplorerDriver(IeSettings());
DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
caps.setCapability("ignoreZoomSetting", true);
aDriver = new InternetExplorerDriver(caps);
Fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With