Automate Edge in IE mode utilizing Selenium

Welcome expensive peruser

You may understand that web pioneer goes to resign and it’ll as of not be upheld by Microsoft after June 15, 2022. Right here I offers you a solution so you’ll be able to contain Edge to automate your heritage software in IE mode utilizing selenium and python.

Requirements for selenium python mechanization

Three vital requirements to automate edge in IE mode

Python adaptation 3.7 or extra

Selenium bundle adaptation 4.0 or above

Web pioneer driver IEDriverServer adaptation 4.0.0.0 or above — obtain from right here.

Code Bit

from selenium import webdriver

ie_options = webdriver.IeOptions()

ie_options.attach_to_edge_chrome = Legitimate

# Add the way in which of microsoft edge executable within the beneath line of code

ie_options.edge_executable_path = “C:/Program Recordsdata(x86)/Microsoft/Edge/Utility/msedge.exe”

driver = webdriver.Ie(choices=ie_options)

driver.get(“https://www.google.com”)

driver.find_element_by_name(“q”).send_keys(“Medium”)

driver.give up()

Observe

Make a degree to maintain IEDriverServer.exe in the same organizer the place the python report is discovered.

Author

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.