mac python selenium Chromedriver配置

Posted django_start

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac python selenium Chromedriver配置相关的知识,希望对你有一定的参考价值。

安装selenium pip install selenium 

下载Chromedriver http://npm.taobao.org/mirrors/chromedriver/

将Chromedriver放在/usr/local/bin 

最终代码
from selenium import webdriver
import time

driver = webdriver.Chrome()
driver.get("http://www.baidu.com")
time.sleep(3)
driver.quit()

  

以上是关于mac python selenium Chromedriver配置的主要内容,如果未能解决你的问题,请参考以下文章

Python 的selenium打包成程序后,电脑里没有安装chrom浏览器,如何运行?

Pycharm+Selenium Python 自动化搭建

webdirver.Chrom() selenium webdirver调用谷歌浏览器的问题解决

python Chrome + selenium自动化测试与python爬虫获取网页数据

Python爬虫教程-28-Selenium 操纵 Chrome

selenium+python在mac环境上的搭建