Tests not executing on IE and failing with zoom level 150% exception | Selenium Python Forum
S
Sambhav Puri Posted on 19/06/2020

I am getting the below exception when trying to execute tests in IE 11:

selenium.common.exceptions.SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. Browser zoom level was set to 150%. It should be set to 100%

 

I modified the OpenBrowser function for IE to ignore the zoom seeting but still I am getting the same exception. Could you help on it. 

if(browserName==Constants.CHROME):
path=Constants.CHROME_DRIVER
self.driver = webdriver.Chrome(executable_path=path)
elif(browserName== Constants.MOZILLA):
path=Constants.FIREFOX_DRIVER
self.driver=webdriver.Firefox(executable_path=path)
elif(browserName==Constants.IE):
path=Constants.IE_DRIVER
caps=webdriver.DesiredCapabilities.INTERNETEXPLORER.copy()
caps['ignoreZoomSetting']=True
self.driver=webdriver.Ie(executable_path=path,capabilities=caps)


J
Jaspreet Replied on 22/06/2020

Hey, 

Instead of the code, just open the IEbrowser on your system and change the zoom level to 100%.