1

Is there a way to use the IE webdriver using selenium in Python script, without having to set the protected modes for all the Zones in IE browser settings?

Note: Scenario is that the organisation does allow you to change the settings in IE browser, so I am looking for a work around.

I am trying the script below but I get the error:

"selenium.common.exceptions.SessionNotCreatedException: 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. "

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

cap = DesiredCapabilities.INTERNETEXPLORER.copy()
cap['INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS'] = True
driver = webdriver.Ie(capabilities=cap, executable_path=r'C:\Users\Harsha\Videos\waterbox\IEDriverServer.exe')
driver.get('https://google.com') 

1 Answers1

0

I've agreed with what the comments have mentioned.It is not allowed that you automate security or other important settings in IE. What you could do is to request your administrator to give the permission to let you do some changes in IE.

Jenifer Jiang
  • 371
  • 1
  • 9