I am new to using webdriver in Python with Selenium and have run into a barrier on something I am working on to automate some data extraction from a webportal. I am trying to enter a date into a textbox, but I my script returns a NoSuchElementException
no matter which way I try to search for the element.
Using Chrome, I can use the below ID to easily identify the element in the inspect window, but finding it with Python has been impossible.
HTML element I am trying to isolate:
input id="6A8A7718100001256A44465A5ED3AEAC-toDate" type="text" value="01/15/2019" size="10" maxlength="10" onchange="validateDateField('to', '6A8A7718100001256A44465A5ED3AEAC-fromDate', '6A8A7718100001256A44465A5ED3AEAC-toDate', '6A8A7718100001256A44465A5ED3AEAC-absRangeErr')"
Here is what I have tried:
from_date = driver.find_elements_by_id("6A8A7718100001256A44465A5ED3AEAC-fromDate")
from_date = driver.find_element_by_xpath("//input[@id='6A8A7718100001256A44465A5ED3AEAC-fromDate']")
from_date = from_date = driver.find_element_by_css_selector("input[id='6A8A7718100001256A44465A5ED3AEAC-fromDate']")
Any help is appreciated, thanks!