【问题标题】:I was not able to open driver (chrome/firefox) in selenium using python我无法使用 python 在 selenium 中打开驱动程序(chrome/firefox)
【发布时间】:2020-07-29 17:13:50
【问题描述】:

我找到的解决方案是-> driver = webdriver.Chrome(executable_path='../drivers/chromedriver.exe')

insert -- executable_path='' 会解决问题的 由于我无法对其他帖子发表评论,所以我尝试构建问题并分享答案。 如果有人对此有任何疑问,请告诉我。

【问题讨论】:

  • 你是在问问题还是在评论什么?
  • 如果您提出问题,我们需要minimal reproducible example
  • 这是一个答案。@GregBurghardt
  • 回答你自己的问题完全没问题,但这需要是一个问题。然后在其下方发布答案。

标签: python selenium automation driver


【解决方案1】:
  1. 如果你想下载 Chrome 驱动程序,你必须下载你喜欢的驱动程序然后你应该访问这个站点 - https://chromedriver.chromium.org/downloads

并检查您的 Chrome 版本,以便您可以下载符合条件的驱动程序。

  1. 如果你想下载 Firefox geckodriver.exe 然后访问 -

https://github.com/mozilla/geckodriver/releases底部有下载链接。根据您喜欢的版本下载一个。

现在,当您下载您最喜欢的驱动程序时,转到您的 Python 编辑器并导入所有 Selenium 事物并编写您在上面编写的代码并确保您执行了这些驱动程序,您将在 Python 编辑器中执行文件

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-28
    • 1970-01-01
    • 2014-04-03
    • 2017-04-27
    • 2017-05-01
    • 1970-01-01
    相关资源
    最近更新 更多