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的更多相关文章

  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: 'chromedriver' executable needs to be in PATH.

    解决办法: 把chromedriver exe文件放到python scripts目录下

  5. 解决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 ...

  6. python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下

  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. selenium使用报错“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”

    安装了python3,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

随机推荐

  1. 达梦数据库产品支持技术学习分享_Week2

    本周主要从以下几个方面进行本人对达梦数据库学习的分享,学习进度和学习情况因人而异,仅供参考. 一.文本命令行工具使用的方法(Disql和dmfldr) 二.数据库备份 三.定时作业功能 四.系统表和动 ...

  2. Go语言网络通信---tcp上传大文件(粘包问题还需优雅解决)

    server端: package main import ( "bufio" "encoding/binary" "fmt" "n ...

  3. 将Oracle数据库改为归档模式并启用Rman备份

    如下Linux环境下对单节点数据库采用文件系统情况的配置归档模式过程. 首先查看数据库归档模式和磁盘使用情况,确定归档文件放到什么位置: [oracle@gisdbserver ~]$ sqlplus ...

  4. 改造 Firefox 浏览器——GitHub 热点速览

    作者:HelloGitHub-小鱼干 上周推荐了一个可以在浏览器上用 VS Code 的项目,这次 Firefox-UI-Fix 带你给 Firefox 来个大变身,在它现有 Proton UI 下进 ...

  5. CVPR2020论文解读:三维语义分割3D Semantic Segmentation

    CVPR2020论文解读:三维语义分割3D Semantic Segmentation xMUDA: Cross-Modal Unsupervised Domain Adaptation  for 3 ...

  6. 使用OneFlow搭建神经网络

    使用OneFlow搭建神经网络 在 识别 MNIST 手写体数字 的例子中,通过 flow.layers 和 flow.nn 中提供的接口搭建了一个简单的 LeNet 网络.下面,将通过LeNet来介 ...

  7. YOLO、SSD、FPN、Mask-RCNN检测模型对比

    YOLO.SSD.FPN.Mask-RCNN检测模型对比 一.YOLO(you only look once) YOLO 属于回归系列的目标检测方法,与滑窗和后续区域划分的检测方法不同,他把检测任务当 ...

  8. Windows下Qt VS 打包程序 到他人电脑安装运行出现的问题

    1.可能缺程序依赖的Qt动态库   ------>    使用Qt自带的windeployqt进入安装程序所在的文件夹内进行自动配置 将程序安装在C盘之外的盘,这样可以方便windeployqt ...

  9. HTML——超链接<a>

    一.超链接的一般格式: <a href="路径" target="目标窗口的位置">链接文本或图像<a/> 1.常用参数说明: href ...

  10. UiPath中恢复依赖项失败的解决方法

    目录 序言 正文 什么是依赖包? 如何查看项目使用了哪些版本的依赖包? 一.项目内查看 二.查看项目的 JSON 文件 问题根源 解决方法 一.「等」字诀 二.切换网络环境(根治) 三.手动复制依赖包 ...