【问题标题】:Specifying a specific browser version in a selenium test run在 selenium 测试运行中指定特定的浏览器版本
【发布时间】:2016-03-03 07:16:54
【问题描述】:

我有两个 Windows Selenium slave,一个用 IE9,一个用 IE10。

使用node json config配置节点:

    {
      "browserName": "internet explorer",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver",
      "version": 10
    }

在测试中(通过 Robotframework 和 Selenium2Library 运行):

Open test browser
    Log to console  Open ${siteUrlFull} in ${browser}
    Open browser  ${siteUrlFull}
    ...  remote_url=http://192.168.10.207:4443/wd/hub
    ...  desired_capabilities=version:10,browserName:${browser}

但是,测试一直失败并出现错误:

WebDriverException:消息:错误转发新会话不能 find : 功能 [{marionette=false, browserName=internet explorer, javascriptEnabled=true,版本=9,平台=任何, firefox_profile=UEsDBBQAAAAIACJxREjOFgm64wIAA...}]

hub状态页面清楚地显示浏览器在IE图标前配置了“9”和“10”。

但由于某种原因,Selenium 拒绝接受版本请求。

【问题讨论】:

    标签: internet-explorer selenium robotframework


    【解决方案1】:

    原来版本属性是一个字符串,因此必须在节点配置中这样指定:

        {
          "browserName": "internet explorer",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver",
          "version": "10" <-.
        }                   |
     >--------Quotes!-------'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-27
      相关资源
      最近更新 更多