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);
    
  • 相关阅读:
    多叉树
    PowerDesigner设置集锦(2)
    Delphi应用程序在命令行下带参数执行返回命令行提示的问题
    不允许在 '*******' 上使用扩展属性,或对象不存在
    仓库管理系统开发完成
    动态创建Frame窗体(根据类名,除T以外的字母)
    Access中的常用TSQL
    批量删除同类文件(带通配符)
    判断Access数据库中的表或查询是否存在的SQL
    序列化FastReport,重要提示少走弯路
  • 原文地址:https://www.cnblogs.com/amosli/p/3409024.html
Copyright © 2011-2022 走看看