是否需要使用RemoteWebDriver 2.35.0 vs 2.34.0为Opera指定新路径?

时间:2013-08-14 13:56:56

标签: python webdriver remotewebdriver

我正在尝试从2.34.0升级到selenium-server-standalone-2.35.0。

我的网格设置: 两种情况下的集线器保持在新的2.35版本: java -jar selenium-server-standalone-2.35.0.jar -role hub

节点: java -jar selenium-server-standalone-2.35.0.jar -role node -nodeConfig localNodeConfig.json

json文件包含:

{
    "capabilities": [
    {
      "browserName": "opera",
      "platform": "VISTA",
      "maxInstances": 1,
    }
  ],
  "configuration": {
    "maxSession": 1,
    "port": 4447,
    "host": ip,
    "register": true,
    "registerCycle": 5000,
    "hubHost": localhost
  }
}

问题是当我运行测试时(通过以下方式创建新驱动程序:remote_webdriver = webdriver.Remote( command_executor='http://localhost:4444/wd/hub', desired_capabilities={'browserName' : 'opera'} )我得到了其他浏览器。测试运行得很好,但是在chrome或Internet Explorer中。

如果我使用相同的config.json等运行2.34.0然后我按预期打开opera(12.16)。

我正在设置env变量: SET OPERA_PATH =%ProgramFiles(x86)%\ Opera \ Opera.exe 这是我的歌剧所在,而不是其他浏览器!

欢迎任何帮助。

编辑:在节点命令窗口中,我可以看到:

15:01:20.870 INFO - 为Capabilities创建一个新会话[{browserName = opera}]
启动InternetExplorerDriver服务器(32位)
2.35.1.0
显示我正在请求正确的浏览器,但由于某种原因没有得到它。

1 个答案:

答案 0 :(得分:0)

这是Selenium 2.35 https://code.google.com/p/selenium/issues/detail?id=6094的已知问题 请等待下一个版本。