I'm trying to access an input field of username (of login page) with Selenium. The page is JavaScript based.
driver.get()
wait by default to load the complete page. In my case, it is unable to load that.
I can inspect the element on browser (firefox) and I get this.
<input type="text" autocomplete="username" name="username">
I tried to wait for that specific element with EC.presence_of_element_located
.
Code trials:
driver = webdriver.Firefox()
driver.get(url)
delay = 10 # seconds
try:
myElem = WebDriverWait(driver, delay).until(EC.presence_of_element_located((By.NAME, 'username')))
print("Page is ready!")
except TimeoutException:
print("Loading took too much time!")
print(driver.page_source)
I get Loading took too much time!
. Even though the element is there as I can inspect it in the browser. I also tried EC.presence_of_element_located((By.TAG_NAME, 'input')))
but It also can't find the tag.
Update from the comments: url='https://drive.inditex.com/drfrcomr/login'