title: Selenium WebDriver to select combo-box item?
body: <p>We are using Selenium WebDriver and JBehave to run "integration" tests on our web-app.  I have a method that will enter a value into a form input. </p>
  
  <pre><code>@When("I enter $elementId value $value")
  public void enterElementText(final String elementId, final String value) {
      final WebElement webElement = webdriver.findElement(By.id(elementId));
      webElement.clear();
      webElement.sendKeys(value);
  }
  </code></pre>
  
  <p>But when I try to use this to select an item in a drop-down list it (unsurprisingly) fails</p>
  
  <blockquote>
    <p>java.lang.UnsupportedOperationException: You may only set the value of
    elements that are input elements</p>
  </blockquote>
  
  <p>How do I select a value in the combo?</p>