title: How can I select a dropdown menu item (value or text) using Selenium and Python?
body: <p>first time posting!</p>
  
  <p>I'm brand new to Python and Selenium, but I'm trying to automate a basic test and I can't find the answer to this problem.</p>
  
  <p>On the main ebay.com page, I'm trying to choose the "All Categories" dropdown menu and choose the "Dolls &amp; Bears" option (option value = "237"). When I execute my script, the menu is accessed, but the "Dolls &amp; Bears" option does not get selected. The test does not return any errors. I have also tried using select_by_visible_text.</p>
  
  <p>Here is my code. I appreciate any help!</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  
  driver = webdriver.Firefox()
  driver.get("http://www.ebay.com")
  assert "Electronics" in driver.title
  elem = driver.find_element_by_id("gh-ac")
  elem.send_keys("funny bear")
  driver.find_element_by_id("gh-cat").click()
  </code></pre>
  
  <p>def select_a_value(select):</p>
  
  <pre><code>Select.select_by_value("237").click()
  </code></pre>