from  selenium import webdriver

dr = webdriver.Chrome()

 运行时报错:

  Python ——selenium报错  'chromedriver.exe' executable needs to be in PATH

 问题分析:

  1、没有下载chromedriver.exe

  2、chromedriver.exe版本不对

 解决方案:

  根据Chrome的版本号,找到与之对应的Chromedriver.exe,地址https://chromedriver.storage.googleapis.com/index.html

  1、添加Chromedriver.exe到系统变量中或者Python根目录下

  2、代码改写:dr = webdriver.Chrome(Chromedriver.exe的路径)

 

相关文章:

  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-30
猜你喜欢
  • 2022-01-02
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案