- OS: Windows 10
- Browser: IE11
- Selenium (Python) package: 3.0.1
- IEWebDriverServer.exe: 3.1.0
We are getting ready to migrate our automation nodes to Windows 10 and during our tests, we found that although our scripts work fine on Win7 on FF, IE, and Chrome, they fail on Windows 10 only for IE (works fine for FF and Chrome).
When running agianst IE, the browser instantiates and webdriver is able to see the browser (I tried a simple command such as driver.back() which returns to previous page). However, we cannot get any find_element... calls to work. Whether it be by id, name, css, xpath, etc. The script will just fail stating that no element was found for the given id/name/css/xpath (whatever method I tried to use to find the webelement).
I have seen posts regarding security updates that broke this and suggesting to revert the update. This was a year ago though and it seems subsequent updates have fixed this issue.
I have also read posts about making sure the protected mode is the same across all zones, a registry value, etc. None of these suggestions have worked though.
Here is the sample script I am using which (when modified to run in Chrome or Firefox passes) does not work in IE11 only:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Ie()
driver.implicitly_wait(30)
driver.maximize_window()
# navigate to the application home page
driver.get("http://www.google.com")
# get the search textbox
search_field = driver.find_element_by_id("lst-ib")
The error from running this script is:
selenium.common.exceptions.NoSuchElementException: Message: Unable to find element with id == lst-ib