文章来源:
http://www.cnblogs.com/Huangsh2017Come-on/p/6852538.html
http://blog.youkuaiyun.com/huilan_same/article/details/52615123
1、google浏览器与driver映射表
http://blog.youkuaiyun.com/huilan_same/article/details/51896672
驱动下载地址:https://chromedriver.storage.googleapis.com/index.html
2、下载好的驱动包chromedriver.exe解压出来,放在谷歌浏览器安装目录下的Application目录中(我的安装路径是:C:\Program Files\Google\Chrome\Application,具体看你们安装的路径),然后配置环境变量在path中添加chromedriver.exe的路径
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get('http://www.baidu.com')
time.sleep(100)
driver.quit()
本文介绍如何将ChromeDriver与Google浏览器进行正确配置以便于自动化测试。内容包括ChromeDriver的下载、与浏览器版本的匹配、驱动文件的放置位置以及环境变量的设置。
483

被折叠的 条评论
为什么被折叠?



