该问题博主是在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. PHP常用的函数与小技巧

    密码加密与验证 password_hash - 创建密码的哈希(hash) string password_hash ( string $password , integer $algo [, arr ...

  2. 线性回归,附tensorflow实现

    本文同步自:https://zhuanlan.zhihu.com/p/30738405 本文旨在通过介绍线性回归来引出一些基本概念:h(x),J(θ),梯度下降法 有一组数据: x=[1,2,3,4, ...

  3. 盘点一下立过的flag并立几个flag

    暑假前说了,要学opencv3,要看完冰火,要健身,要家教挣钱. 好样的,全都没落下. opencv3几乎是把80%的demo码了一遍. 冰火看完,还顺带学了一波知识,收获颇丰,搞到了马丁老爷子的几本 ...

  4. C#图片压缩上传

    /// <summary> /// 压缩图片 /// </summary> /// <param name="iSource">图片文件< ...

  5. 项目实战——企业级Zabbix监控实战(一)

    项目实战--企业级Zabbix监控实战 实验一:Zabbix监控的搭建 1.实验准备 centos系统服务器3台. 一台作为监控服务器, 两台台作为被监控节点, 配置好yum源. 防火墙关闭. 各节点 ...

  6. Android - "cause failed to find target android-14" 问题

    在导入别人的工程项目时经常会遇到各种问题,本文中的就是其中SDK不对导致的   在导入项目时已经修改了 两个build.gradle文件 错误的原因是后面中这两项没修改. compileSdkVers ...

  7. java版Web Socket,实现消息推送

    # web socket是什么? WebSocket协议是基于TCP的一种新的网络协议. 它实现了浏览器与服务器全双工(full-duplex)通信,允许服务器主动发送信息给客户端. ## 用途 实时 ...

  8. eric6 中 designer 无法启动的解决办法

    1.安装环境:win10+python3.6+Eric6 2.问题:使用 pip install PyQt5 安装 PyQt5.9 版本后,发现 Eric6 中无法打开 designer.exe 工具 ...

  9. Numpy入门 - 数组切片操作

    本节主要演示数组的切片操作,数组的切片操作有两种形式:更改原数组的切片操作和不更改原数组的切片操作. 一.更改原数组的切片操作 import numpy as np arr = np.array([1 ...

  10. 虚拟机安装 deepin Linux 注意事项

    主要要注意下面几点: 一.虚拟机"客户机操作系统"类型 选择"Windows 7 x64" 选择"客户机操作系统"类型,这个选择十分重要,D ...