I want to Open browser in Edge with IE mode. My environment: IE7, windows 11, Python 3.10.4, Edge version 108.0.1462.46 And I follow the required configuration from below: https://www.selenium.dev/documentation/ie_driver_server/
- I made the same value for Enhanced Protected Mode by setting the REG_DWORD 2500 value to 0 in Zones 0,1,2,3,4: Registry Editer path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
- I add the IEDriverServer to my PATH
Is there any wrong steps about my configuration?
Below is my code:
*** Settings ***
Library SeleniumLibrary
*** Variables ***
${IEDriver} D:\\IEDriver\\64bits\\IEDriverServer.exe
*** Test Cases ***
Example Test
Open Browser https://www.google.com.tw/ ie executable_path=${IEDriver} options=ignore_zoom_level=True; attach_to_edge_chrome=True; edge_executable_path="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
Maximize Browser Window
After I executing my code, I can open google in Edge with IE mode, but after that web page stuck and always get thie error message: TimeoutException: Message: Timed out waiting for page to load.
CodePudding user response:
This option may work for you in Windows 11 IE mode automation. Check it out:
ignore_protected_mode_settings = True
UPDATE
Or you can simply try setting the page load timeout according to your requirement:
*** Variables ***
${orig timeout} 15 seconds
*** Test Cases ***
Example Test
Set Selenium Timeout ${orig timeout}
CodePudding user response:
And I found something interesting: I use python and selenium and below is my code:
ieOptions = webdriver.IeOptions()
ieOptions.add_additional_option("ie.edgechromium", True)
ieOptions.add_additional_option("ie.edgepath",'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe')
driver = webdriver.Ie(options=ieOptions)
driver.maximize_window()
driver.get('https://google.com')
driver.quit()
If I remove this line "driver.get('https://google.com')" and my code runs perfectly. But If I add it back, the page will go to goole and stuck there (It means that this code will not do driver.quit()