title: How can I use Selenium to navigate a pop-up calendar with Python?
body: <p>This is a hobby project so I can get more familiar with Selenium.</p>
  
  <p>I have a list of dates.  I want to get the movie times for each of those dates.  I can load the theater site and calendar without any issues, but when I get to selecting the specific day I get snagged.  How can I use Selenium to click on the day inside the calendar?   </p>
  
  <p>Here is what I have so far.  Open browser, load page, click and open calendar:</p>
  
  <pre><code>from selenium import webdriver
  
  browser = webdriver.Firefox()
  url = "https://www.amctheatres.com/movie-theatres/los-angeles/amc-promenade-16"
  browser.get(url)
  browser.find_element_by_xpath(".//*[@id='showtime-date']").click()
  browser.implicitly_wait(3)
  </code></pre>
  
  <p>My three attempts so far that haven't worked.                                                            </p>
  
  <p><strong>Attempt 1:</strong>                                                                                                 When I try to find the link by text I get:                                                           </p>
  
  <blockquote>
    <p>NoSuchElementException: Message: Unable to locate element                                                </p>
  </blockquote>
  
  <pre><code>elem = browser.find_element_by_link_text('28').click()                                                   
  </code></pre>
  
  <p><strong>Attempt 2:</strong><br>
  this xpath finds the element and the click method works, but I want to be able to pick a day by string text                                                                                                       </p>
  
  <pre><code>xpath = ".//*[@id='theatre-showtimes-202']/div/div[2]/div[1]/div/div/div[1]/table/tbody/tr[5]/td[5]"     
  elem = browser.find_element_by_xpath(xpath).click()                                                      
  </code></pre>
  
  <p><strong>Attempt 3:</strong><br>
  finding the element by xpath and text works, but then the click method doesn't do anything               </p>
  
  <pre><code>xpath_by_text = '//td[contains(text(), "28")]'
  elem = browser.find_element_by_xpath(xpath_by_text).click()
  </code></pre>
  
  <p>What can I do to find the calendar day by the day number and then click on it?</p>