程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了尽管驱动程序在/ usr / local / bin中,selenium“仍无法找到匹配的功能集”大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决尽管驱动程序在/ usr / local / bin中,SELEnium“仍无法找到匹配的功能集”?

开发过程中遇到尽管驱动程序在/ usr / local / bin中,SELEnium“仍无法找到匹配的功能集”的问题如何解决?下面主要结合日常开发的经验,给出你关于尽管驱动程序在/ usr / local / bin中,SELEnium“仍无法找到匹配的功能集”的解决方法建议,希望对你解决尽管驱动程序在/ usr / local / bin中,SELEnium“仍无法找到匹配的功能集”有所启发或帮助;

更新firefox和SELEnium为我解决了它。但是,我不假装对根本原因进行解释。

  • 更新了firefox 48→53
  • 更新到SELEnium 3.4.1

我还Geckodriver使用HomebrewSELEnium对其进行了重新安装/更新,并明确地将其用作了SELEnium的可执行文件WebDriver,但事实证明,不必缓解“无法找到匹配的功能集” 错误。

解决方法

我正在尝试遵循有关SELEnium的教程http://SELEnium-python.readthedocs.io/getTing-
started.html。我已下载的最新版本geckodriver并将其复制到/usr/local/bin。但是,当我尝试

from SELEnium import webdriver
driver = webdriver.Firefox()

我收到以下错误消息

TraceBACk (most recent call last):
  File "/Users/kurtpeek/Documents/Scratch/SELEnium_getTing_started.py",line 4,in <module>
    driver = webdriver.Firefox()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SELEnium/webdriver/firefox/webdriver.py",line 152,in __init__
    keep_alive=TruE)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SELEnium/webdriver/remote/webdriver.py",line 98,in __init__
    self.start_session(desired_capabilities,browser_profilE)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SELEnium/webdriver/remote/webdriver.py",line 188,in start_session
    response = self.execute(Command.NEW_SESSION,parameters)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SELEnium/webdriver/remote/webdriver.py",line 252,in execute
    self.error_handler.check_response(responsE)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SELEnium/webdriver/remote/errorhandler.py",line 194,in check_response
    raise exception_class(message,screen,stacktracE)
SELEnium.common.exceptions.WebDriverException: message: Unable to find a matching set of capabilities

[Finished in 1.2s with exit code 1]

https://github.com/SELEniumHQ/SELEnium/issues/3884看来,其他用户也遇到了类似的问题,但是SELEnium团队无法复制它。如何使SELEnium与Firefox兼容?(它确实可以chromedriver和一个webdriver.Chrome()实例一起使用,所以我怀疑这可能是SELEnium中的错误)。

大佬总结

以上是大佬教程为你收集整理的尽管驱动程序在/ usr / local / bin中,selenium“仍无法找到匹配的功能集”全部内容,希望文章能够帮你解决尽管驱动程序在/ usr / local / bin中,selenium“仍无法找到匹配的功能集”所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。