mercredi 22 novembre 2017

Why Date decrease and increase for days and months ? selenium

when i use selenium (with python) to fill input dates, days are diminished and months increased.

I use this code to fill the input

self.selenium.execute_script("document.getElementById('startDateLS').valueAsDate = new Date(2017, 11, 02);")
self.selenium.execute_script("document.getElementById('endDateLS').valueAsDate = new Date(2017, 11, 22);")

but the result is this:

input dates

Do you know why?

Aucun commentaire:

Enregistrer un commentaire