第一步:安装selenium
在命令提示符中输入命令:pip install selenium
如果在执行对应的python的代码时报错:Message: ‘chromedriver’ executable needs to be in PATH。则继续执行下面的第二步骤
第二步:下载安装chorme driver驱动
下载地址如下:http://chromedriver.storage.googleapis.com/index.html
此处我们选择了最新的79.0.3945.36,下载对应的Win32版本
第三步:将下载获得的chromedriver.exe的文件放到C:\Program Files (x86)\Google\Chrome\Application
如果你用的Chrome 开发版,则对应目录为C:\Program Files (x86)\Google\Chrome Dev\Application
第四步:在环境变量PATH中添加chromedriver.exe所在的目录
- 本文固定链接: http://jingyan.idoubi.net/2269.html
- 转载请注明: 游戏创作者大陆 于 逗分享开发经验 发表