【发布时间】:2018-08-30 21:47:59
【问题描述】:
我遇到以下错误:“启动 Internet Explorer 时出现意外错误。所有区域的保护模式设置不同。启用保护模式必须设置为相同的值(为所有区域启用或禁用) ." 使用 Selenium WebDriver 打开 IE 时。
在 Java 中(使用 selenium-server 3.8.1),我使用以下方法解决了这个问题:
InternetExplorerOptions options = new InternetExplorerOptions();
options.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
driver = new InternetExplorerDriver(options);
如何为 Robot Framework 执行此操作(使用 SeleniumLibrary 的 Java 端口:robotframework-seleniumlibrary-3.8.1.0-jar-with-dependencies)?
${ie_options}= Create Dictionary InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS=true
Open Browser ${url} ie None None ${ie_options} None
我尝试了上面的方法,但仍然遇到错误。将其更改为 ignoreProtectedModeSettings 无济于事。有什么想法吗?
【问题讨论】:
标签: java selenium robotframework selenium-iedriver