试了把chromedriver.exe放到chrome安装文件下,python安装文件下,然后把路径配到path里,均无用。

最后是修改函数调用得以解决:

from selenium import  webdriver

browser = webdriver.Chrome(executable_path = 'C:\Program Files (x86)\Google\Chrome\Application\chromedriver_X64.exe')
browser.get('http://www.baidu.com')

executable_path指定了chromedriver所在的路径,程序运行时就会到该路径下启动chrome浏览器

相关文章:

  • 2022-01-12
  • 2021-05-20
  • 2022-12-23
  • 2021-12-10
  • 2021-04-28
  • 2021-05-16
猜你喜欢
  • 2021-06-15
  • 2022-12-23
  • 2021-07-01
  • 2022-01-02
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案