【问题标题】:org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities in TestNGorg.openqa.selenium.SessionNotCreatedException:无法在 TestNG 中找到一组匹配的功能
【发布时间】:2018-11-29 12:28:32
【问题描述】:

我在 Firefox 浏览器中执行网格时遇到错误“无法找到一组匹配的功能”。

Selenium 版本:3.14.0,Geckodriver:0.23.0,firefox 版本:63.0

Grid code

在我的代码中: 在这行代码中抛出错误: d = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), obj1);

【问题讨论】:

  • 使用 Hub 和 Node 启动命令和日志以及错误跟踪日志更新问题以供进一步分析。

标签: selenium grid


【解决方案1】:

请通过此链接检查 gecko 驱动程序、selenium 和 firefox 版本的兼容性。 https://github.com/mozilla/geckodriver/releases 如果匹配,请编写以下代码,它对我有帮助。

FirefoxOptions fo = new FirefoxOptions();
ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("default");
fo.setProfile(myprofile);

【讨论】:

    猜你喜欢
    • 2018-01-26
    • 2018-09-22
    • 2019-04-04
    • 2018-07-30
    • 2018-08-27
    • 1970-01-01
    • 1970-01-01
    • 2020-04-28
    • 1970-01-01
    相关资源
    最近更新 更多