The code is as follows:
# Coding=utf-8 from Import webdriverdriver=webdriver. Ie () driver.get ('https://www.baidu.com')print Driver.titledriver.quit ()
Error:
Traceback (most recent): File"D:\Users\xxxxx\workspace\aautotest\test_ie.py", Line 12,inch<module>driver= Webdriver. Ie () File"D:\Python27\lib\site-packages\selenium\webdriver\ie\webdriver.py", Line 54,inch __init__desired_capabilities= capabilities) File"D:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 74,inch __init__ self.start_session (desired_capabilities, browser_profile) File"D:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 123,inchstart_session'desiredcapabilities': desired_capabilities, File"D:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", Line 175,inchExecute self.error_handler.check_response (response) File"D:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 166,inchCheck_responseraise Exception_class (message, screen, StackTrace) Selenium.common.exceptions.WebDriverException:Message: Unexpected error launching Internet Explorer. Protected Mode settings is not the same for all zones. Enable Protected Mode must is set to the same value (enabled or disabled) for all zones.
Solution: The IE protection mode is selected or all can be ticked off:
Selenium using IE browser issues