SeleniumHQ / selenium

A browser automation framework and ecosystem.

Home Page:https://selenium.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[πŸ› Bug]: Python Selenium IE mode in edge don't work

AI-Jiny opened this issue Β· comments

What happened?

https://stackoverflow.com/questions/74435275/python-selenium-internet-explorer-scripts-dont-work

Referencing the above link, I attempted to execute the code in a same environment, but after driver.get(), browser opens and the code just stucks without any error. When I changed the version of the IEDriverServer.exe file to 4.0.0, it ran normally, but the same symptoms occur with higher versions. i used selenium version 4.18.1 and 4.3.

How can we reproduce the issue?

from selenium import webdriver
from selenium.webdriver.ie.service import Service

ser = Service("D:\\IEDriverServer.exe")
ieOptions = webdriver.IeOptions()
ieOptions.add_additional_option("ie.edgechromium", True)
ieOptions.ignore_protected_mode_settings = True
ieOptions.ignore_zoom_level = True
ieOptions.add_additional_option("ie.edgepath",'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe')
driver = webdriver.Ie(service = ser, options=ieOptions)
driver.maximize_window()
driver.get("https://google.com")
print("anything")

Relevant log output

no log, output or error

Operating System

Windows10

Selenium version

Python 4.3, 4.18.1

What are the browser(s) and version(s) where you see this issue?

IE mode in Edge 122.0.2365.66

What are the browser driver(s) and version(s) where you see this issue?

IEDriverServer 4.1.0 or higher versions

Are you using Selenium Grid?

not used

issue

@AI-Jiny, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

Please check this post and let us know the outcome: https://titusfortner.com/2022/09/28/edge-ie-mode.html

Thank you for your reply.
Removing "ie_options.ignore_protected_mode_settings = True" and unifying the '2500' dword values of five zones inside HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones was effective.

Now it works well! Thanks again.