Internet Explorer Launching Gives Errors in Selenium Webdriver

As selenium user know, Selenium script can be run via FireFox, Chrome and Internet Explorer if you set up the environments correctly, you may read this post if you are un-sure. If you face an error while launching Internet explorer in selenium test automation, you need to set all the security zone in the same mode (enabled, or disabled mode).

If you change security zone, selenium gives the following errors, and the last one says "Protected Mode settings are not the same for all zones" so you can set the protected mode by Tool > Internet Options > Security Tab then set Internet, Local Internet, Trusted Sites, and Restricted Sites as same mode, enabled or disabled. Then click "Apply" and "OK" and repeat your tests.

File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\selenium\webdriver\ie\webdriver.py", line 53, in __init__
    desired_capabilities=DesiredCapabilities.INTERNETEXPLORER)
  File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 63, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 105, in start_session
    'desiredCapabilities': desired_capabilities,

  File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 156, in execute
    self.error_handler.check_response(response)
  File "C:\Python27\lib\site-packages\selenium-2.25.0-py2.7.egg\selenium\webdriver\remote\errorhandler.py", line 147, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u'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.'


Enable Protected Mode

Comments

Popular posts from this blog

Selenium Error "Element is not currently interactable and may not be manipulated"

Change Default Timeout and Wait Time of Capybara

Page-Object Pattern for Selenium Test Automation with Python

Performance Testing on CI: Locust is running on Jenkins

How to Set Shared Preferences in Espresso Test for Kotlin and Java