Python保护设置IE [英] Python protection settings IE

查看:325
本文介绍了Python保护设置IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在自动执行IE using Selenium with python中的保护设置时遇到问题.

I am facing a problem automating the protection settings in IE using Selenium with python.

我找到了一种自动化Java中设置的解决方案,但是当我将其更改为python时,它不起作用.

I found a solution to automate the settings in java but it is not working when i changed it to python .

我尝试了以下操作:

from selenium import webdriver

caps=webdriver.DesiredCapabilites.INTERNETEXPLORER
caps['INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS']=True
driver=webdriver.Ie(caps)

这给了给定参数一个错误.

This gave an error with respect to the argument given .

当我使用driver = webdriver.Ie()时 它说所有区域的保护模式设置都必须相同.

and when I used driver = webdriver.Ie() It says protection mode settings must be same for all zones.

任何人都可以帮助我在python中使用硒自动执行此操作.

推荐答案

根据文档,在python-selenum中,您应该使用称为 ignoreProtectedModeSettings:

According to documentation, in python-selenum, you should use setting called ignoreProtectedModeSettings:

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

caps = DesiredCapabilities.INTERNETEXPLORER
caps['ignoreProtectedModeSettings'] = True

driver = webdriver.Ie(capabilities=caps)

这篇关于Python保护设置IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆