title: Access datepicker with python2.7 and selenium
body: <p>I'm trying to specify the dates on a datepicker from this application:</p>
  
  <p><a href="http://www.wetter-by.de/Internet/AM/inetcntrBY.nsf/cuhome.xsp?src=4JHVFJGNW4&amp;p1=535TN12L42&amp;p3=2CQ7BH7901&amp;p4=4D078O1691" rel="nofollow noreferrer">http://www.wetter-by.de/Internet/AM/inetcntrBY.nsf/cuhome.xsp?src=4JHVFJGNW4&amp;p1=535TN12L42&amp;p3=2CQ7BH7901&amp;p4=4D078O1691</a></p>
  
  <p>Though, I wasn't able to switch to the iframe, because Firefox would only give me the absolute xpath. Also, Chropath does not seem to work on this particular iframe. Instead, I switch to the direct link: </p>
  
  <p><a href="http://dlr45.aspdienste.de/cgi-bin/wdaasc/wdaa_client.pl?cid=7" rel="nofollow noreferrer">http://dlr45.aspdienste.de/cgi-bin/wdaasc/wdaa_client.pl?cid=7</a></p>
  
  <p>The datepicker takes numbers by typing, too, so I tried to specify my dates by sending keys. This is my first try:</p>
  
  <pre><code>browser = webdriver.Firefox()
  browser.get('http://dlr45.aspdienste.de/cgi-bin/wdaasc/wdaa_client.pl?cid=7')
  browser.maximize_window()
  
  select = Select(browser.find_element_by_id('sid'))
  select.select_by_index(2)
  
  from_date = browser.find_element_by_xpath("//input[@id='from']")
  from_date.send_keys("01102016")
  from_date.send_keys(Keys.RETURN)
  </code></pre>
  
  <p>The error states that the Element is not reachable by keyboard, so I accessed the calendar directly, here is my second try:</p>
  
  <pre><code>browser = webdriver.Firefox()
  browser.get('http://dlr45.aspdienste.de/cgi-bin/wdaasc/wdaa_client.pl?cid=7')
  browser.maximize_window()
  
  select = Select(browser.find_element_by_id('sid'))
  select.select_by_index(2)
  
  from_date =  browser.find_element_by_xpath("//input[@id='from']")
  
  #Specify year
  ActionChains(browser).move_to_element(from_date).click().send_keys("2016").perform()
  
  WebDriverWait(browser,4)
  
  #Jump to Oktober
  for i in np.arange(9):
      next_month = browser.find_element_by_class_name('ui-datepicker-next')
      next_month.click()
  
  day = browser.find_element_by_class_name('ui-state-default')
  ActionChains(browser).move_to_element(day).send_keys('01').perform()
  </code></pre>
  
  <p>So far, the month and the year are correctly picked, and it looks like the 1st of October is being selected, but not clicked. </p>
  
  <p>Is there an easy way to send the dates (like in my first try)? If not, how can I click the day, as in the second? I don't need the iframe-switch anymore but if someone has any idea how to find the xpath I would appreciate it. </p>