title: How to test autocomplete using selenium and Python
body: <p>I've been writing a couple of tests using selenium for my website. However, I've not found a way to test an input textfield that is filled by auto completion. As an example, I want to select one of the locations that is displayed in an auto-complete list dropdown.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>driver.find_element_by_id("id_location_0").send_keys("Free City")
  driver.find_element_by_id("ui-active-menuitem").click()
  </code></pre>
  
  <p>How is Auto-complete/Auto-suggest testing achieved in selenium using Python?</p>
  
  <p><strong>NOTE:</strong> Google search is a good example of what I'm trying to do.</p>