0

I am trying to set the date of an input for some form data for this website (start_date) with selenium, but nothing actually happens. I can see the field being selected, but when it comes to actually changing the data send_keys doesn't actually seem to do anything. Here is the code any help would be appreciated:

`from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
import time

driver = webdriver.Chrome()
# driver.maximize_window()
driver.get("https://permits.mynevadacounty.com/CitizenAccess/Cap/CapHome.aspx?module=Building&TabName=Building")
wait = WebDriverWait(driver, 20)
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, "img[src='/CitizenAccess/nc-horizontal.png']")))
start_date = wait.until(EC.visibility_of_element_located((By.ID, "ctl00_PlaceHolderMain_generalSearchForm_txtGSStartDate")))
start_date.send_keys('01/01/2023')

time.sleep(10)
driver.quit()`

1 Answers1

0

maybe you could try to setting the value instead of sending keys:

Raw Javascript Code example
    var dd = document.getelementbyId(ctl00_PlaceHolderMain_generalSearchForm_txtGSStartDate)
    dd.value ="24/04/2023" 

here you got a refer link of how to do it well: How to set "value" to input web element using selenium?