title: selenium webdriver how to select from list menu item
body: <p>How do I select an item in the list of menu items once it appears as a dropdown? I tried sendKeys to input the text like "Brown Mustard", but it clears out when I hit the submit button. I know I should be able to type it in the field but WebDriver sendKeys didn't work, so if you have suggestions on how to select from a list menuitems, thanks so much!</p>
  
  <p>Here's the html snippet of the text field and the menu items that appear when you enter say "B"</p>
  
  <pre><code>     &lt;input id="combobox0-text" class="ui-autocomplete-input ui-widget 
       ui-widget-content tableRightFormTextField" autocomplete="off" 
       role="textbox" aria-autocomplete="list" aria-haspopup="true"&gt; 
  
      &lt;li class="ui-menu-item" role="menuitem"&gt;&lt;a class="ui-corner-all" 
      tabindex="-1"&gt;Bro&lt;strong&gt;w&lt;/strong&gt;n Mustard&lt;/a&gt;&lt;/li&gt;
      &lt;li class="ui-menu-item" role="menuitem"&gt;&lt;a class="ui-corner-all"    
      tabindex="-1"&gt;Bro&lt;strong&gt;w&lt;/strong&gt;ntop&lt;/a&gt;&lt;/li&gt;
  </code></pre>