I am trying to use chromedriver
to download some files.
I have switched to chromedriver
because in firefox
the link I need to click opens a new window and the download dialog box appears even after all the required settings and I wasn't able to get around it.
chromedriver
works fine for the download but I can't seem to send_keys()
to the element below, it works on firefox but can't seem to get it to work on this.
<input name="" value="" id="was-returns-reconciliation-report-start-date" type="date" class="was-form-control was-input-date" data-defaultdate="" data-mindate="" data-maxdate="today" data-placeholder="Start Date" max="2020-02-12">
I have tried:
el = driver.find_element_by_id("was-returns-reconciliation-report-start-date")
el.clear()
el.send_keys("2020-02-01")
el.send_keys(Keys.ENTER) # Separately
# Tried without clear as well
# no error but the date didn't change in the browser
driver.execute_script("document.getElementById('was-returns-reconciliation-report-start-date').value = '2020-01-05'")
# No error and no change in the page