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. RMAN CROSSCHECK命令 说明

    CROSSCHECK命令:     用于核对磁盘和磁带上的备份文件,以确保RMAN资料库与备份文件保持同步.注意:该命令只会检查RMAN资料库所记载的备份文件.当执行crosscheck命令时,如果资 ...

  2. Python3.6 的字典为什么会快

    作者:青南链接:https://zhuanlan.zhihu.com/p/73426505来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 在Python 3.5(含)以 ...

  3. .Net Core Api发布时报502.5 [The Application process failed to Start]问题的解决原因

       碰到这样的错误,在网上找了很久很久.我自己在部署的时候已经把Core 部署需要的环境包在服务器安装好了.还会报这个错,然后在网上找的安装了一个系统补丁包!安装之后还是不行.最后我把服务器重启了一 ...

  4. guava cache 缓存

    1.guava缓存 新建一个缓存对象cache,当取不到key对应的值时,生成一个,并插入到cache中 LoadingCache<String,String> cache = Cache ...

  5. KITTI数据集上MaskRCNN检测效果示例

    KITTI数据集上MaskRCNN检测效果示例 在Semantic Instance Segmentation Evaluation中,MaskRCNN性能效果排名第一. Test Image 0 I ...

  6. 微调BERT:序列级和令牌级应用程序

    微调BERT:序列级和令牌级应用程序 Fine-Tuning BERT for Sequence-Level and Token-Level Applications 为自然语言处理应用程序设计了不同 ...

  7. Java日期时间API系列39-----中文语句中的时间语义识别(time NLP 输入一句话,能识别出话里的时间)原理分析

    NLP (Natural Language Processing) 是人工智能(AI)的一个子领域.自然语言是人类智慧的结晶,自然语言处理是人工智能中最为困难的问题之一(来自百度百科). 其中中文更是 ...

  8. Django基础之视图层

    内容概要 小白必会三板斧 request对象方法初识 form表单上传文件 Jsonresponse FBV与CBV 内容详细 1 小白必会三板斧 HttpResponse render redire ...

  9. 【模板】Linux下输出文件的对比

    命令格式: diff+[参数]+[文件1或目录1]+[文件2或目录2] 命令参数: 指定要显示多少行的文本.此参数必须与-c或-u参数一并使用. -a或--text diff预设只会逐行比较文本文件. ...

  10. NOIP模拟测试2「排列 (搜索)·APIO划艇」

    排序 内存限制:128 MiB 时间限制:1000 ms 标准输入输出     题目描述 输入格式 数据范围与提示 对于30%的数据,1<=N<=4: 对于全部的数据,1<=N< ...