Hi I am trying to figure it out how to pick day from the calendar in Python. I would like to select the date 04/27/2022 under requested loading date. I read some post related to this but I could not figure it out. This is what I did so far but not working.
driver = webdriver.Chrome(PATH)
link = "https://www.freightquote.com/"
driver.get(link)
sleep(2)
driver.maximize_window()
#click Accept
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//button[@id='truste-consent-button']"))).click()
#Scroll down:
total_height = int(driver.execute_script("return document.body.scrollHeight"))
[enter image description here][1]for i in range(1, 500, 5):
driver.execute_script("window.scrollTo(0, {});".format(i))
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '//input[@class="datepicker-here hasDatepicker-od" and @id="txtShippingDate" ]'))).click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '//div[@class="datepicker--cell datepicker--cell-day" and @data-date="27" and @data-month="3" an @data-year="2022"]'))).click()