selenium webdriver启动IE浏览器失败的解决办法
2017-01-09 10:16
906 查看
通过selenium webdriver启动IE浏览器失败,报错:selenium.common.exceptions.WebDriverException: Message: 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.
解决办法:修改浏览器安全设置---工具-Internet选项-安全-(Internet/本地Internet/受信任的站定/受限制的站点)启用保护模式全部勾选或全部去掉勾选。
然后运行脚本出现如下问题:
![](https://images2015.cnblogs.com/blog/564932/201701/564932-20170109101100760-1175120171.png)
selenium.common.exceptions.WebDriverException: Message: Failed to navigate to http://www.baidu.com. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed.
解决办法:在生成webdriver对象之前,用脚本修改浏览器配置:
解决办法:修改浏览器安全设置---工具-Internet选项-安全-(Internet/本地Internet/受信任的站定/受限制的站点)启用保护模式全部勾选或全部去掉勾选。
然后运行脚本出现如下问题:
![](https://images2015.cnblogs.com/blog/564932/201701/564932-20170109101100760-1175120171.png)
selenium.common.exceptions.WebDriverException: Message: Failed to navigate to http://www.baidu.com. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed.
解决办法:在生成webdriver对象之前,用脚本修改浏览器配置:
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities DesiredCapabilities.INTERNETEXPLORER["ignoreProtectedModeSettings"] = True
相关文章推荐
- Selenium的WebDriver打开IE失败的解决办法
- selenium webdriver启动Chrome浏览器后无法输入网址的解决办法
- selenium webdriver定位不到元素的五种原因及解决办法
- Selenium2(webdriver)_定位不到元素常见原因及解决办法
- selenium webdriver定位不到元素的五种原因及解决办法
- Selenium::WebDriver::Error::WebDriverError:Unable to find standalone executable解决办法
- Selenium::WebDriver::Error::WebDriverError:Unable to find standalone executable解决办法
- selenium-webdriver 关于测试新打开页面报错解决办法
- pycharm + selenium + python 提示 Unresolved reference 'webdriver' 解决办法
- selenium webdriver定位不到元素的五种原因及解决办法
- org/openqa/selenium/WebDriver : Unsupported major.minor version 51.0的解决办法
- java web开发中tomcat启动失败,一直端口占用的解决办法
- selenium webdriver定位不到元素的五种原因及解决办法
- selenium webdriver定位不到元素的五种原因及解决办法(转载)
- selenium+webdriver+python定位不到元素的原因及解决办法
- selenium webdriver定位不到元素的五种原因及解决办法
- selenium webdriver定位不到元素的五种原因及解决办法(51testing)
- (org.openqa.selenium.WebDriverException: Unable to launch the app: Error: Trying to start logcat capture but it's already started! )错误解决办法
- WebView启动支付宝客户端支付失败的解决办法
- selenium webdriver定位不到元素的五种原因及解决办法