I am using Selenium to create a Python script that automatically pulls data from a site that we keep it. This website requires the use of Internet Explorer mode in Edge and I am running into issues because of this. To not put any classified info out there – I will use Google homepage -> Gmail click as an example.
My code will open Google and click on Gmail with webdriver.Edge() but with webdriver.Ie() it only opens the page and does nothing.
from selenium import webdriver
# from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
# Create a new instance of the Edge driver
driver = webdriver.Edge()
# Navigate to a website
driver.get("https://www.google.com")
# Find an element by its ID and interact with it
gmail_link = driver.find_element(By.LINK_TEXT, "Gmail")
gmail_link.click()
# Close the browser
driver.quit()
I need to figure out how to get it to click on Gmail in Internet Explorer, .Ie() mode. Let me know if you have any suggestions! If I can figure out how to get Ie mode to click on something in Google, I’ll be able to do it with the other site.
Thanks in advance!
Aprille Laporta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.