【发布时间】:2019-07-22 14:22:05
【问题描述】:
在将我们严重过时的 FirefoxPortable 更新到最新版本 68.0.1 后,我正在努力让我们的集成测试恢复并运行。 据了解,我使用了 geckodriver。但我不断收到以下消息。
错误:
org.openqa.selenium.SessionNotCreatedException(Unable to find a matching set of capabilities
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_171'
Driver info: driver.version: FirefoxDriver
代码:
if (OS.isFamilyWindows()) {
FirefoxBinary binary =
new FirefoxBinary(new File(binPath + "/firefoxWindows/FirefoxPortable.exe"));
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setCapability("marionette", true);
System.setProperty("webdriver.gecko.driver", binPath + "/geckoWindows/geckodriver.exe");
firefoxOptions.setBinary(binary);
ffDriver = new FirefoxDriver(firefoxOptions);
}
我们的集成测试将在共享的 Linux Jenkins 测试服务器上执行。目前我使用的是 Windows。
我想继续使用便携式版本的 Firefox,以防止与使用同一台机器的其他团队发生冲突。不幸的是,安装 Docker 也是没有选择的。
我们正在使用 Java.version: '1.8.0_171',我们发布得太晚了,无法切换到更高版本。
我应该切换到 Chrome 吗?
我需要一个快速的解决方案,谢谢。
【问题讨论】:
标签: java selenium firefox marionette geckodriver