V
V
V2016-08-29 15:24:11
Python
V, 2016-08-29 15:24:11

How to select dates using Python Selenium?

I would like to set date fields on this site ( http://ru.ceair.com) using Selenium. Can't figure out how to do it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-08-29
@ermolushka

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

browser = webdriver.Firefox()
browser.get('http://ru.ceair.com')

browser.find_element_by_id('startdate').send_keys('2016-08-29') #поле вылета
browser.find_element_by_id('enddate').send_keys('2016-09-29') #поле возвращения

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question