python+selenium自动化测试——浏览器驱动

selenium控制浏览器需要下载对应版本的驱动,并把下载好的驱动解压然后拷贝到python的安装目录。

 

1、chrome

驱动对应版本及下载地址;https://npm.taobao.org/mirrors/chromedriver/

2、firefox

驱动下载地址 ;https://github.com/mozilla/geckodriver/releases/

3、IE

驱动下载地址;http://www.cr173.com/soft/195732.html

IE的启用保护模式

打开IE——》设置——》Internet选项——》安全——》启用保护模式前的对勾,4个需全部勾选或全部不勾选,否则会报以下错误;

"Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones."

 

posted @ 2018-02-04 22:50  holly&j  阅读(1796)  评论(0编辑  收藏  举报