每其他堆栈溢出,我都有以下代码(我无法控制IE安全设置)
private static WebDriver setToIE(){
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
System.setProperty("webdriver.ie.driver", "./libs/IEDriverServer.exe");
InternetExplorerOptions options = new InternetExplorerOptions(capabilities);
return new InternetExplorerDriver(options);
}
但是当我跑步时我得到了...
org.openqa.selenium.SessionNotCreatedException: 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.
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:08.638Z'
System info: host: 'XXXXXX', ip: 'xxx.xx.xx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_161'
Driver info: driver.version: InternetExplorerDriver
版本信息...
如何使IEDriver与我的浏览器一起使用?