I want to select a date from this DatePicker :
So far, I have been able to select today's date only. But I don't know how to select a specific date. From this I need to select yesterday's date. Here what I've done so far:
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
driver = webdriver.Chrome(chromedriver)
driver.get('https://www.ut.com.sv/reportes?p_auth=vUIS4sqn&p_p_id=MenuReportesEstadisticos_WAR_CompletePublicReports&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_MenuReportesEstadisticos_WAR_CompletePublicReports_reportName=25cargosdelsistema')
elm = driver.find_element_by_link_text('Cargos del Sistema')
driver.implicitly_wait(5)
elm.click()
#TIPO
drpmedicion=driver.find_element_by_id('tipo')
drpmed=Select(drpmedicion)
driver.implicitly_wait(2)
drpmed.select_by_visible_text('Indicativo')
driver.implicitly_wait(2)
#SALIDA
drpsalida=driver.find_element_by_id('outType')
drpsal=Select(drpsalida)
driver.implicitly_wait(2)
drpsal.select_by_visible_text('csv')
#FECHAS INICIO
date1=driver.find_element(By.NAME,'fecha_desde')
date1.click()
driver.implicitly_wait(2)
date1.click()
driver.implicitly_wait(2)
date2=driver.find_element(By.CLASS_NAME,'picker__button--today')
date2.click()
driver.implicitly_wait(5)
#FECHAS FIN
date3=driver.find_element(By.NAME,'fecha_hasta')
driver.implicitly_wait(2)
date3.click()
driver.implicitly_wait(2)
date3.click()
driver.implicitly_wait(5)
date4=driver.find_elements(By.CLASS_NAME,'picker__button--today')
date4[1].click()
driver.implicitly_wait(5)
#CLICK FINAL
btn=driver.find_element(By.XPATH, '//*[@id="portlet_FormularioReportesEstadisticos_WAR_CompletePublicReports"]/div/div/div/input')
btn.click()