title: How to select a value from a drop down in python
body: <p>I have tried many things it can't seem to get it to work so I am posting this question to hopefully learn the simple method of selecting from a drop down menu in python.</p>
  
  <p>I manage to open the drop down menu but how can I select a value (let's say 4 in this example) from the drop down?</p>
  
  <p>Below is the code that opens the drop down:</p>
  
  <pre><code>#select adults
  adults = driver.find_element_by_xpath("//*[@id='adults-number']").click()
  </code></pre>
  
  <p>Below is the html that consists of all the options in the drop down (the one highlighted is the value I want selected):</p>
  
  <p><a href="https://i.stack.imgur.com/nBIaA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nBIaA.png" alt="enter image description here"></a></p>