I am trying to set the custom start and end date to date picker using selenium python. I have tried multiple tries but still not able to get the data with custom dates. It’s returning the data with present dates only.
My code start_date_input = driver.find_element(By.ID, 'viewer_par_tab_t0_pForm_edStartDate_text') date_value = "07/01/2023" driver.execute_script("arguments[0].value = arguments[1];", start_date_input, date_value) driver.execute_script("arguments[0].dispatchEvent(new Event('input', { bubbles: true }));", start_date_input) input_value = start_date_input.get_attribute('value') print(f'Input field value: {input_value}')
In the Get Attribute I can see the custom value of dates but when I click on submit report button it;s just showing me present dates data.
Can anyone please help me out in this. I have attached the screen shot of date picker. Do i need to click on every xpath and select dates