说明:仅供学习使用,请勿用于非法用途,若有侵权,请联系博主删除

作者:zhu6201976

博客:https://blog.csdn.net/zhu6201976

 

一、需求 Python Selenium 驱动 IE 浏览器 版本 11

 

 

二、IE的配置

取消启动所有保护模式,不取消报错:

Unexpected error launching Internet Explorer. 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.

 

三、IE 驱动的选择,32位而非64位, 否则报错,附下载地址:http://npm.taobao.org/mirrors/selenium/

 

四、 示例代码

from selenium.webdriver import Ie
import time

ie = Ie(executable_path='IEDriverServer.exe')

for i in range(3):
    ie.get('www.baidu.com')
    time.sleep(3)

 

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐