该问题博主是在Mac环境遇到的,对应windows找对应解决方案解决即可。

问题原因:

  phantomjs环境配置有问题,要么是配置错误,要么是没有配置。

解决方案:

  1、将下载解压好的phantomjs文件拷贝到 /usr/bin 目录下(下载链接:http://phantomjs.org/download.html), 不要问我为什么不能自定义目录,因为我也不知道~

          selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executab

  2、终端命令行执行:sudo vi ~/.bash_profile ,添加如下配置:

     export PATH=$PATH:/usr/bin/phantomjs

  3、终端命令行执行:source ~/.bash_profile,重新载入配置,可以开始你的 phantomjs 之旅啦!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2021-05-24
  • 2021-10-21
  • 2021-05-02
猜你喜欢
  • 2021-04-17
  • 2021-12-14
  • 2021-05-22
  • 2021-12-20
  • 2021-11-14
  • 2021-05-07
相关资源
相似解决方案