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

问题原因:

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

解决方案:

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

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

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

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


selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executab的更多相关文章

  1. centos7 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    1.查看安装的chrome浏览器版本 2.查看版本对应的驱动 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载后拷贝到 ...

  2. selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)

    1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...

  3. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  4. 关于Selenium.common.exceptions.WebDriverException: Message: Invalid locator strategy: css selector 的问题

    在执行脚本时报Selenium.common.exceptions.WebDriverException: Message: Invalid locator strategy: css selecto ...

  5. appium selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect

    selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect. We wanted {" ...

  6. selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary

    使用Chrome浏览器时,经常会遇到以下报错:浏览器没有调用起来 selenium.common.exceptions.WebDriverException: Message: unknown Err ...

  7. windows下使用selenium报错selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH

    问题 :执行程序代码报错: WebDriverException:Message:'geckodriver'executable needs to be in Path 或者 selenium.com ...

  8. selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 错误处理方法

    首次使用selenium webdriver,webdriver.Firefox() 报错selenium.common.exceptions.WebDriverException: Message: ...

  9. 【Python + Selenium】初次用IE浏览器之报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

    初次用IE浏览器运行自动化程序时,报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launchi ...

随机推荐

  1. [转载] zookeeper应用——集中配置管理系统的实现

    转载自http://blog.csdn.net/huangfengxiao/article/details/8844239 1 场景描述 参考http://www.ibm.com/developerw ...

  2. github设置

    ssh-key: https://help.github.com/articles/generating-ssh-keys http://segmentfault.com/q/101000000013 ...

  3. git命令提交项目

    相关的操作命令,总是忘记,故在此记录下: 此为linux下的命, windows的话,去掉sudo即可 1.进入项目代码根目录,执行: sudo git init 把这个目录变成git可以管理的仓库. ...

  4. unity3d资源打包总结

    http://www.manew.com/blog-33734-12973.html unity 打包的时候会把下面几个文件资源打进apk或者ipa包里面 1. Asset下的所有脚本文件 2. As ...

  5. openGL光源概念

    1. 光照模型      环境光——经过多次反射而来的光称为环境光,无法确定其最初的方向,但当特定的光源关闭后,它们将消失. 全局环境光——每个光源都能对场景提供环境光.此外,还有一个环境光,它不来自 ...

  6. django事务处理

    #导包 from django.db import transaction try: #django默认是自动提交到数据库,此处设置不让其自动提交 transaction.set_autocommit ...

  7. GDI+ 应用,Release没有错误,Debug很多。

    问题描述: 在VC6环境中,一个界面工程利用了GDI+的一些库,Release模式下编译.运行无误,但在Debug模式下就会报告错误. xxx.cpp D:\Program Files\Microso ...

  8. Javascript-数值运算 保留小数点位数,并对最后一位小数各种取整方法

    今天遇到Javascript数值运算的坑,说到底,还是用得少啊.得多用多敲代码多遇坑. 先介绍以下三个Javascript number取整运算方法. Math.floor() 对一个数退一取整 例: ...

  9. KMP算法求next数组

    next数组的求解方法是:第一位的next值为0,第二位的next值为1.后面求解每一位的next值时,根据前一位进行比较.首先将前一位与其next值对应的内容进行比较,如果相等,则该位的next值就 ...

  10. MySQL 性能优化的最佳20多条经验分享(一)(转)

    当我们去设计数据库表结构,对操作数据库时(尤其是查表时的SQL语句),我们都需要注意数据操作的性能.这里,我们不会讲过多的SQL语句的优化,而只是针对MySQL这一Web应用最多的数据库.希望下面的这 ...