title: Python selenium to select first element from the dropdown list
body: <p>The below piece of code clicks the file menu on a page which contain excel worksheet.</p>
  
  <pre><code>from selenium import webdriver
  driver = webdriver.PhantomJS()
  driver.set_window_size(1120, 550)
  driver.get(r"foo%20Data%20235.xlsx&amp;DefaultItemOpen=3") # dummy link
  driver.find_element_by_css_selector('#jewel-button-middle &gt; span').click() # responsible for clicking the file menu
  driver.quit()
  </code></pre>
  
  <p>And I don't know how to click the first option ie, Download a snapshot option from the popup menu. I can't able to inspect the elements of pop up or dropdown menu. I want the xlsx file to get downloaded.</p>
  
  <p><a href="https://i.stack.imgur.com/RUdKY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RUdKY.png" alt="enter image description here"></a></p>