即使使用INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,也可以获得“所有区域的保护模式设置都不同”

时间:2018-08-01 14:10:27

标签: selenium-iedriver

每其他堆栈溢出,我都有以下代码(我无法控制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

版本信息...

  • 硒:3.13
  • IE:11.09

如何使IEDriver与我的浏览器一起使用?

0 个答案:

没有答案