title: Sending Keys Using Splinter
body: <p>I want to test an autocomplete box using Splinter. I need to send the 'down' and 'enter' keys through to the browser but I'm having trouble doing this. </p>
  
  <p>I am currently finding an input box and typing 'tes' into that box successfully</p>
  
  <pre><code>context.browser.find_by_xpath(\\some\xpath\).first.type('tes')
  </code></pre>
  
  <p>What I want to do next is to send some keys to the browser, specifically the 'down' key (to select the first autocomplete suggestion) then send the 'enter' key to select that autocomplete element.</p>
  
  <p>I've tried extensive searches and can't figure out how to do this.</p>
  
  <p>I even tried some javascript</p>
  
  <pre><code>script = 'var press = jQuery.Event("keypress"); press.keyCode = 34; press.keyCode = 13;'
  context.browser.execute_script(script)
  </code></pre>
  
  <p>but that didn't do anything unfortunately</p>
  
  <p>packages I'm using: </p>
  
  <p>django 1.6
  django-behave==0.1.2
  splinter 0.6</p>
  
  <p>current config is:<br>
      from splinter.browser import Browser
      from django.test.client import Client</p>
  
  <pre><code>context.browser = Browser('chrome')
  context.client = Client()
  </code></pre>