Selenium Python IE 11 Runtime Problem

Asked

Viewed 81 times

0

I have a problem running Selenium on IE 11.

from selenium import webdriver
from selenium.webdriver.common.keys import Keys 
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

My code is on that basis, the problem is, the browser opens there at the time of the send_keys() nothing happens to him.

I am using the following module for Iedriverserver.exe, using from webdriver_manager.microsoft import IEDriverManager

Does anyone know the reason for this problem ?

1 answer

0


When Voce is instantiating the use of the webdriver, it is using Firefox and not IE.

Try to use:

driver = webdriver.ie()

instead of:

driver = webdriver. Firefox()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.