Ejemplo n.º 1
0
  /**
   * Selects combobox item. If verification mode is on, checks that right item has been selected.
   *
   * @param index Item index.
   * @throws TimeoutExpiredException
   */
  public void selectItem(int index) {
    output.printLine(
        "Select " + Integer.toString(index) + "\'th item in combobox\n    : " + toStringSource());
    output.printGolden("Select " + Integer.toString(index) + "\'th item in combobox");
    try {
      waitComponentEnabled();
    } catch (InterruptedException e) {
      throw new JemmyException("Interrupted", e);
    }

    driver.selectItem(this, waitItem(index));

    if (getVerification()) {
      waitItemSelected(index);
    }
  }
Ejemplo n.º 2
0
 /**
  * Selects an item by text.
  *
  * @param item a text pattern.
  * @param comparator a searching criteria.
  */
 public void selectItem(String item, StringComparator comparator) {
   output.printLine("Select \"" + item + "\" item in combobox\n    : " + toStringSource());
   output.printGolden("Select \"" + item + "\" item in combobox");
   selectItem(waitItem(item, comparator));
 }