selenium-server-standalone-3.0.1无法在路径中找到firefox二进制文件

时间:2016-11-16 11:57:46

标签: selenium-webdriver selenium-firefoxdriver

我只是在Selenium Grid集线器和节点上升级到selenium-server-standalone-3.0.1。

我意识到,JSON配置稍有变化(https://github.com/SeleniumHQ/selenium/wiki/Grid2)。

相应地更改我的配置后,节点正常启动。但是我无法在firefox上运行任何测试,因为我收到以下错误:

Exception: Cannot find firefox binary in PATH. Make sure firefox is installed.   OS appears to be: VISTA
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'ebc-vie-selenium-node-01', ip: '10.100.0.157', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_71'
Driver info: driver.version: FirefoxDriver

JSON配置如下所示:

"capabilities":
  [
    {
      "browserName": "firefox",
      "version": "49.0.2",
      "platform": "WINDOWS",
      "firefox_binary": "C:\\Program Files (x86)\\Mozilla Firefox\\ESR\\Firefox_49.0.2\\firefox.exe",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },

当我直接从Java代码设置firefox_binary时,它工作正常(使用Gecko Driver)

desiredCapabilities.setCapability("firefox_binary", "C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\ESR\\\\Firefox_49.0.2\\\\firefox.exe");

分别知道为什么会发生版本3.0.1的JSON配置更改

的原因

0 个答案:

没有答案