Skip to content

Commit 0af7432

Browse files
committed
Make IE browser more compatible
1 parent 4b38096 commit 0af7432

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,20 @@ def get_local_driver(browser_name, headless, proxy_string):
286286
if not IS_WINDOWS:
287287
raise Exception(
288288
"IE Browser is for Windows-based operating systems only!")
289-
ie_capabilities = DesiredCapabilities.INTERNETEXPLORER.copy()
289+
ie_caps = DesiredCapabilities.INTERNETEXPLORER.copy()
290+
ie_caps['ignoreProtectedModeSettings'] = True
291+
ie_caps['IntroduceInstabilityByIgnoringProtectedModeSettings'] = True
292+
ie_caps['nativeEvents'] = True
293+
ie_caps['ignoreZoomSetting'] = True
294+
ie_caps['requireWindowFocus'] = True
295+
ie_caps['INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS'] = True
290296
if LOCAL_IEDRIVER and os.path.exists(LOCAL_IEDRIVER):
291297
make_driver_executable_if_not(LOCAL_IEDRIVER)
292298
return webdriver.Ie(
293-
capabilities=ie_capabilities,
299+
capabilities=ie_caps,
294300
executable_path=LOCAL_IEDRIVER)
295301
else:
296-
return webdriver.Ie(capabilities=ie_capabilities)
302+
return webdriver.Ie(capabilities=ie_caps)
297303
elif browser_name == constants.Browser.EDGE:
298304
if not IS_WINDOWS:
299305
raise Exception(

0 commit comments

Comments
 (0)