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);
    
  • 相关阅读:
    AxAssist安装说明
    回调方法
    Export to Excel/Word COMInterface
    Using Timer
    转英文 TotalEng
    设置报表的 条形码 Barcode 字体 生产参数
    Silverlight5.0新特性一览
    Silverlight地理地质信息系统
    微软台湾发布Silverlight的卡通形象MM——藍澤光
    微软Silverlight4与Adobe Flex4打成平手,SL与FLEX技术全面对比
  • 原文地址:https://www.cnblogs.com/amosli/p/3409024.html
Copyright © 2011-2022 走看看