zoukankan      html  css  js  c++  java
  • 【解决问题】failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer.

    failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: 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. (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 1.06 seconds
    Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00'
    System info: host: 'Test3-PC', ip: '172.16.8.184', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_45'
    Driver info: org.openqa.selenium.ie.InternetExplorerDriver
    Command duration or timeout: 1.86 seconds
    Build info: version: '2.35.0', revision: '8df0c6bedf70ff9f22c647788f9fe9c8d22210e2', time: '2013-08-17 12:46:41'
    System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_15'
    Driver info: org.openqa.selenium.remote.RemoteWebDriver)

     连接局域网中的另一台电脑,做selenium webdriver 远程测试,之前一直是好的,后来过几天再运行发现报以上错误,网上搜了下,问题解决,原理暂时没时间研究.

    原来代码为:
    WebDriver webDriver;
    webDriver = new RemoteWebDriver(new URL("http://192.168.0.30:4444/wd/hub"), DesiredCapabilities.internetExplorer());
    
    
    
    改为:
    WebDriver webDriver;
    
    DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
          ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
    
     webDriver = new RemoteWebDriver(new URL("http://192.168.0.30:4444/wd/hub"), ieCapabilities);
    
  • 相关阅读:
    html css div img垂直居中
    jquery 多选框 checkbox 获取选中的框
    css 滚动条样式
    css 翻牌 翻转 3d翻转 特效
    css强制不换行 多出的字省略号
    jquery获取元素坐标获取鼠标坐标
    鸡汤 咯咯
    <bean> 中配置详解 </bean>
    正则表达式的囧
    我的天$删除注册表$安装mysql最后一步不能启动服务的解决办法
  • 原文地址:https://www.cnblogs.com/amosli/p/3409024.html
Copyright © 2011-2022 走看看