mercredi 22 novembre 2017

selenium add value in input, type = 'date' in firefox

I'm using Firefox 57 to use input type="date" this input is inside label, the label is showed like that:

date_picker code html

When i click inside de input or label i get a date_picker. but i'm trying to set a value using selenium in python, i'm not capable to set it, i tried with setKeys("01/01/2017"), and execute_script to find the element and set it.

Currently, I'm using this code to set value, the value is modified but i have this error.

self.selenium.execute_script("document.getElementById('startDateAS').valueAsDate = new Date(2017,11,17)")

value_modified error

anybody has an idea how to set the value ? thank you

Aucun commentaire:

Enregistrer un commentaire