selenium--环境搭建

1、安装selenium库:pip install selenium

2、安装google浏览器

3、根据不同的google浏览器版本下载对应的chromedriver驱动,win32也能在64位上运行

驱动下载地址:https://sites.google.com/a/chromium.org/chromedriver/或者

https://chromedriver.storage.googleapis.com/index.html或者

http://npm.taobao.org/mirrors/chromedriver/

版本对应关系:http://blog.csdn.net/huilan_same/article/details/51896672

4、把下载的chromedriver.exe

5、把chromedriver.exe所在的文件夹加入环境变量里(调用webdriver.Chrome()时不需要写路径)

猜你喜欢

转载自www.cnblogs.com/guang2508/p/13190601.html