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);
    
  • 相关阅读:
    Android绝黑剑之AutoCompleteTextView、MultiAutoCompleteTextView之智能联想
    F5 BIGIP负载均衡器配置实例与Web管理界面体验
    Java进阶之动态绑定
    某大型银行深化系统之二十:异常规范
    数据结构之排序
    数据结构之数组
    使用ssh来登录其它linux机器
    beanstalkc简易指令说明集
    ruby数组方法concat和push的区别
    uWSGI基础攻略
  • 原文地址:https://www.cnblogs.com/amosli/p/3409024.html
Copyright © 2011-2022 走看看