其他分享
首页 > 其他分享> > Selenium配置

Selenium配置

作者:互联网

1. 安装selenium库

切换到pip所在文件夹,并安装

c:\>cd /d d:\
d:\>cd Python\Python36\Scripts
d:\Python\Python36\Scripts>pip.exe install selenium

安装成功

Collecting selenium
  Downloading https://files.pythonhosted.org/packages/b8/53/9cafbb616d20c7624f
f31bcabd82e5cc9823206267664e68aa8acdde4629/selenium-3.14.0-py2.py3-none-any.wh
l (898kB)
    29% |█████████▌                      | 266kB 1.4MB/s eta 0:00:01
    ...
    ...
    ...
1kB 1.3MB/s
Requirement already satisfied: urllib3 in d:\python\python36\lib\site-paRequirement already satisfied: urllib3 in d:\python\python36\lib\site-
 (from selenium) (1.23)
Installing collected packages: selenium
Successfully installed selenium-3.14.0

 

 

2. 使用FireFox下载geckodriver,使用chrome下载chromedriver

geckodriver地址:https://github.com/mozilla/geckodriver/releases

chromedriver地址:http://chromedriver.storage.googleapis.com/index.html

注意:chromedriver版本需要与浏览器版本匹配,参考地址:https://blog.csdn.net/huilan_same/article/details/51896672

 

 

3. 解压后将exe文件放到python根目录下 D:\Python\Python36

20180827162537.png

标签:...,geckodriver,Selenium,配置,selenium,chromedriver,Python36,https
来源: https://www.cnblogs.com/p36606jp/p/15113455.html