转载地址:https://www.jianshu.com/p/39716ea15d99?utm_source=oschina-apppython
☁ ~ pip3 install selenium ☁ ~ pip3 list selenium Package Version ---------- ------- pip 18.0 selenium 3.14.0 setuptools 40.2.0 urllib3 1.23 wheel 0.31.1
到官网查看最新版本web
查看最新版本与chrome的匹配chrome
查看chrome版本npm
根据本身的操做系统下载相应安装包bash
能够选择到淘宝镜像下载app
下载后,将安装包加入到环境变量。以mac系统为例,将chromedriver移至/usr/bin目录下便可测试
☁ ~ chromedriver
Starting ChromeDriver 2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db) on port 9515
Only local connections are allowed.
测试可否调用chromeurl
☁ ~ ipython
Python 3.7.0 (default, Aug 22 2018, 15:22:33)
Type 'copyright', 'credits' or 'license' for more information IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: from selenium import webdriver In [2]: browser = webdriver.Chrome() In [3]: