mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
- from selenium import webdriver
- def test1():
- url='http://www.baidu.com'
- driver=webdriver.Chrome("/usr/local/bin/chromedriver")
- driver.get(url)
- if __name__ == '__main__':
- test1()
1.下载Chrome对应版本的数据驱动
访问https://npm.taobao.org/mirrors/chromedriver/ 链接 找到你的chrome对应的版本,下载
mac下载完成后在当前下载路径可直接解压缩。 找到电脑搜索按钮。找到/usr/local/bin/目录 拷贝。认证。进行运行项目即可启动 浏览器
如还报路径错误
mac selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
通用-打开。来自身份不明的开发者 点击 仍要打开 在启动项目即可解决路径问题
总结:
此错误就是找不到数据驱动
也就是路径问题,路径正确即可
另:
在加载数据驱动时 这个
- Chrome开头一定要大些。不然无法调用驱动
- webdriver.Chrome
错误提示:
driver=webdriver.chrome("/usr/local/bin/chromedriver")
TypeError: 'module' object is not callable
mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH的更多相关文章
- 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 下载后拷贝到 ...
- 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 ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
解决办法: 把chromedriver exe文件放到python scripts目录下
- 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
解决方案: 1.查看浏览器当前版本:chrome://version/. 2.到https://sites.google.com/a/chromium.org/chromedriver/downloa ...
- python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下
- 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 ...
- selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 错误处理方法
首次使用selenium webdriver,webdriver.Firefox() 报错selenium.common.exceptions.WebDriverException: Message: ...
- selenium使用报错“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”
安装了python3,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...
随机推荐
- 西门子 S7-200 通过以太网通讯模块连接MCGS 通讯
北京华科远创科技有限研发的远创智控ETH-YC模块,以太网通讯模块型号有MPI-ETH-YC01和PPI-ETH-YC01,适用于西门子S7-200/S7-300/S7-400.SMART S7-20 ...
- 快速上手 Linkerd v2 Service Mesh(服务网格)
在本指南中,我们将引导您了解如何将 Linkerd 安装到您的 Kubernetes 集群中. 然后我们将部署一个示例应用程序来展示 Linkerd 的功能. 安装 Linkerd 很容易.首先,您将 ...
- Linux - fuser 命令
前言 之前连公司堡垒机的时候发现连不上,找运维排查是建立的链接数太多,很多超时链接没有断掉,导致不能再创建链接 此时,需要手动断开用户终端链接,然后百度搜到 fuser 可以断开用户终端链接 命令作用 ...
- 使用Relay部署编译ONNX模型
使用Relay部署编译ONNX模型 本文介绍如何使用Relay部署ONNX模型的入门. 首先,必须安装ONNX软件包. 一个快速的解决方案是安装protobuf编译器,然后 pip install o ...
- TensorFlow常用Python扩展包
TensorFlow常用Python扩展包 TensorFlow 能够实现大部分神经网络的功能.但是,这还是不够的.对于预处理任务.序列化甚至绘图任务,还需要更多的 Python 包. 下面列出了一些 ...
- MindSpore张量mindspore::tensor
MindSpore张量mindspore::tensor MSTensor #include <ms_tensor.h> MSTensor定义了MindSpore Lite中的张量. 构造 ...
- 系统芯片(SOC)架构- Aviral Mittal
系统芯片(SOC)架构- Aviral Mittal System on Chip Architecture-Aviral Mittal 此技术是在设计片上系统时考虑体系结构级别的因素.同样,范围是围 ...
- RGB Color Codes Chart
RGB Color Codes Chart RGB颜色空间 RGB颜色空间或RGB颜色系统,从红色.绿色和蓝色的组合中构造所有颜色. 红色.绿色和蓝色各使用8位,它们的整数值从0到255.这使得256 ...
- linux安装后配置
1.1 系统设置(自测用,公司不需要) 1.1.1 Selinux系统安全保护 Security-Enhanced Linux – 美国NSA国家安全局主导开发,一套增强Linux系统安 全的强制访问 ...
- Django(70)接口版本控制
前言 在RESTful规范中,有关版本的问题,用restful规范做开放接口的时候,用户请求API,系统返回数据.但是难免在系统发展的过程中,不可避免的需要添加新的资源,或者修改现有资源.因此,改 ...