Ошибка ActionChains дублируются ключи отправки python - PullRequest
0 голосов
/ 06 августа 2020

Я пытаюсь отправить значения на входы с помощью строк действий и ключей отправки, но он накапливает ключи

#Select Start Hour 
Shour = driver.find_element_by_xpath("//input[@formcontrolname='horaInicio']").click()
actions.send_keys('1400').perform()
time.sleep(.3)
#Select End Hour 
Ehour = driver.find_element_by_xpath("//input[@formcontrolname='horaFinal']").click()
actions.send_keys('1415').perform()
time.sleep(.3)
#Select Person house 
PHouse= driver.find_element_by_xpath("//input[@formcontrolname='numeroPersonaEnHogar']").click()
actions.send_keys('3').perform()
time.sleep(.3)
#Select Childs 
Childs= driver.find_element_by_xpath("//input[@formcontrolname='numeroNinosDeCeroCinco']").click()
actions.send_keys('1').perform()
time.sleep(.3)

Ожидается:

#Select Start Hour
14:00
#Select End Hour 
14:15
#Select Person house
3
#Select Childs
1

Вывод:

#Select Start Hour
input type time = 14:00 - OK
#Select End Hour 
input type time = 14:15 - OK
#Select Person house
140014153 - Error acumulated 
#Select Childs
1400141531 - Error acumulated

Помогите, пожалуйста, решение и почему накапливается?

...