今天用selenium的webdriver调用Firefox浏览器遇到了异常:
WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.
百度之后说没有geckodriver.exe,于是去github下载,之后放到了浏览器安装目录下和python安装目录下。并且把浏览器的安装目录添加到系统环境变量的path中去。
在进行webdriver调用时还是异常,但是变成了:

raise WebDriverException(“Can not connect to the Service %s” % self.path)
之后又百度,说是localhost问题,把ipv6的地址注释掉(#::1)
python+selenium调用Firefox浏览器exception处理之后可以正常运行了。

相关文章:

  • 2021-07-03
  • 2021-07-23
  • 2021-09-09
  • 2022-12-23
  • 2021-08-18
  • 2021-07-30
  • 2021-04-12
  • 2021-10-22
猜你喜欢
  • 2021-07-05
  • 2022-12-23
  • 2021-07-06
  • 2021-12-25
  • 2021-05-22
  • 2021-08-10
  • 2021-08-02
相关资源
相似解决方案