从Eclipse启动RemoteWebDriver测试时出错

时间:2014-06-17 16:45:16

标签: java json firefox selenium remotewebdriver

我在Eclipse控制台中收到以下消息:

无法创建选定的WebDriver;早退出。 org.openqa.selenium.WebDriverException:转发新会话时出错:找不到:{platform = ANY,browserName = firefox,version =}

1 个答案:

答案 0 :(得分:1)

解决方案:检查nodeConfig.json文件并确认目标浏览器包含在功能对象中。在这个问题上," firefox"名称:缺少值对。

"capabilities":
  [
    {
      "browserName": "firefox",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },      
    {
      "browserName": "chrome",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },
    {
      "platform": "WINDOWS",
      "browserName": "internet explorer",
      "maxInstances": 1,
      "seleniumProtocol": "WebDriver"
    }
  ],