Python Selenium 驱动IE11 亲测有效
说明:仅供学习使用,请勿用于非法用途,若有侵权,请联系博主删除作者:zhu6201976博客:https://blog.csdn.net/zhu6201976一、需求 Python Selenium 驱动 IE 浏览器 版本 11二、IE的配置取消启动所有保护模式,不取消报错:Unexpected error launching Internet Explorer. Protected Mode
·
说明:仅供学习使用,请勿用于非法用途,若有侵权,请联系博主删除
作者: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)
更多推荐
已为社区贡献17条内容
所有评论(0)