I got a website which is just compatible with Internet Explorer. We activated the Edge Internet Explorer Mode Option, but im unable to handle the website with Selenium. Is there any way to use IE-Mode with Edge in Selenium?
Advertisement
Answer
You need to download the recommended version of IE Driver Server from this link then refer to the code below to use Edge IE mode in Selenium in Python:
from selenium import webdriver ieOptions = webdriver.IeOptions() ieOptions.add_additional_option("ie.edgechromium", True) ieOptions.add_additional_option("ie.edgepath",'C:Program Files (x86)MicrosoftEdgeApplicationmsedge.exe') driver = webdriver.Ie(executable_path='E:webdriverIEDriverServer.exe', options=ieOptions) driver.maximize_window() driver.get('https://www.google.com/')
Note: Change the paths in the code to your owns.
Result: