How To Click On Date In Zebra Datepicker In Html?
After taking suggestions from people here, I think I reached somewhere. I again got stuck. I have to scrape data from a website using datepicker. html says that the website is usin
Solution 1:
To send a date to the datepicker you can use the following Locator Strategies:
Code Block:
from selenium import webdriver from selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("start-maximized") driver = webdriver.Chrome(options=chrome_options) driver.get("http://apsdps.ap.gov.in/des_rainfall.html") driver.execute_script("arguments[0].removeAttribute('readonly')", WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.CSS_SELECTOR, "input#datepicker-example6")))) WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input#datepicker-example6"))).send_keys("07/06/2019")
Browser Snapshot:
Post a Comment for "How To Click On Date In Zebra Datepicker In Html?"