code: public void select(String optionLocator) {
          getDispatcher().beforeSelect(this, optionLocator);
          
          if (StringUtils.isBlank(optionLocator)) {
              throw new IllegalArgumentException("Locator cannot be null or empty.");
          }
          if (optionLocator.split("=").length != 2) {
              StringBuilder errMsg = new StringBuilder("Invalid locator specified :");
              errMsg.append(optionLocator);
              errMsg.append(". Locator should be of the form label=<value> (or) ");
              errMsg.append("value=<value> (or) ");
              errMsg.append("index=<value> (or) ");
              errMsg.append("id=<value>.");
              throw new IllegalArgumentException(errMsg.toString());
          }
          String locatorToUse = optionLocator.split("=")[1].trim();
          String tLocator = optionLocator.toLowerCase().split("=")[0].trim();
          if (tLocator.indexOf("label") >= 0) {
              // label was given
              new Select(getElement()).selectByVisibleText(locatorToUse);
          } else if (tLocator.indexOf("value") >= 0) {
              // value was given
              new Select(getElement()).selectByValue(locatorToUse);
          } else if (tLocator.indexOf("index") >= 0) {
              // index was given
              new Select(getElement()).selectByIndex(Integer.parseInt(locatorToUse));
          } else if (tLocator.indexOf("id") >= 0) {
              // id was given
              getElement().findElementById(locatorToUse).click();
          } else {
              throw new NoSuchElementException("Unable to find " + optionLocator);
          }
          
          getDispatcher().afterSelect(this, optionLocator);
      }
docs: Selects an option using optionLocator. Locator must be prefixed with one of the following: <li>label= <li>value=
  <li>index= <li>id=
  
  @param optionLocator
  the select list option locator