【问题标题】:Can not start special firefox with Json configuration on Selenium 3无法在 Selenium 3 上使用 Json 配置启动特殊的 Firefox
【发布时间】:2017-01-03 17:11:56
【问题描述】:

我使用 Selenium Grid 并通过 Json 配置节点和集线器 这是我的 json

{
  "capabilities":
  [
    {
      "browserName": "firefox",
      "browser-version": "38.8.0",
      "maxInstances": 5,
      "firefox_binary": "C:/Program Files (x86)/secutix/Matterhorn_V3/FireFoxPortableESR/App/Firefox/firefox.exe",
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "chrome",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "internet explorer",
      "maxInstances": 1,
      "seleniumProtocol": "WebDriver"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 5,
  "port": 5568,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://localhost:4444",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {}
}


我启动了 Hub(很好)
我启动了 Node(很好)
但是当我通过 maven cmd "mvn clean verify" 运行 serenity 测试时 仅创建了 Current Firefox 45.6 版。 FireFoxPortableESR 没有。
如果将 Selenium-server-standalon 从 3.0 更改为 2.53,它可以正常工作。
那么在使用 Selenium 3.0* 时如何调用 FireFoxPortableESR

【问题讨论】:

    标签: selenium-webdriver selenium-grid


    【解决方案1】:

    您必须在下面添加两个键才能运行FirefoxSelenium V3.0

    {
    "capabilities":
      [
        {
          "browserName": "firefox",
          "browser-version": "38.8.0",
          "maxInstances": 5,
          **"webdriver.gecko.driver" : "path to gecko driver"** -----> add path to gecko driver
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "chrome",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "internet explorer",
          "maxInstances": 1,
          "seleniumProtocol": "WebDriver"
        }
      ],
      "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
      "maxSession": 5,
      "port": 5568,
      "register": true,
      "registerCycle": 5000,
      "hub": "http://localhost:4444",
      "nodeStatusCheckTimeout": 5000,
      "nodePolling": 5000,
      "role": "node",
      "unregisterIfStillDownAfter": 60000,
      "downPollingLimit": 2,
      "debug": false,
      "servlets" : [],
      "withoutServlets": [],
      "custom": {}
      "marionette" : true  ------------------> add marionette = true
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-06
      • 2015-02-28
      • 2017-02-25
      • 2018-01-13
      • 2014-01-20
      • 1970-01-01
      • 1970-01-01
      • 2017-04-26
      相关资源
      最近更新 更多