driver = webdriver.Ie("C:\\IEDriverServer.exe")
driver.get(testurl)
driver.refresh()
time.sleep(5)
data = driver.find_element_by_id("__content0-value-scr")
So I'm trying to find an element by it's id using Selenium (Python) and Internet Explorer, because I'm limited to Internet Explorer due to company regulations.
My problem is as follows:
on driver.get(testurl)
, selenium loads the page but IE first starts up with the IEDriver landing page.
Only after that, it loads the requested url.
The problem here is that Selenium recognizes the IE Driver landing page as the url to be loaded and therefore ignores the page I want to search on, which gets loaded after that.
Has anyone got an idea on how to work around this?
driver.refresh()
right afterdriver.get(testurl)
? – Lomasidriver.get
then shows the landing page for a second, after that opens the requested url. – ConstituencyWebDriverWait
method to wait for something on the landing page before you do thedriver.get()
? – WicklowNoSuchElementException: Message: Unable to find element with id == __content0-value-scr
– Constituency