Package org.openqa.selenium.support.ui

Examples of org.openqa.selenium.support.ui.Select


    // click [Edit] first evaluation (OPEN):
    waitAndClick(By.id("editEvaluation0"));

    // edit contents
    for (int i = 0; i < s.team.students.size(); i++) {
      Select select = new Select(driver.findElement(By.id("points" + i)));
      select.selectByValue("80");
      // selenium.select("points" + i, "value=80");

      wdFillString(By.name("justification" + i), String.format(
          "Student Edit:: Justification from %s to %s.", s.email,
          s.team.students.get(i).email));
View Full Code Here


      try {
        driver.get(baseurl);

        driver.findElement(By.id("SearchInput_RoundTrip")).click();

        new Select(driver.findElement(By.name("SearchInput$Orig")))
            .selectByValue(trip.getDeparture().getOrigin().getIataCode());
        new Select(driver.findElement(By.name("SearchInput$Dest")))
            .selectByValue(trip.getDeparture().getDestination().getIataCode());

        waitingRandomSec(5);

        driver.findElement(By.name("SearchInput$DeptDate")).click();
View Full Code Here

        try {
          driver.get(baseurl);

          driver.findElement(By.id("SearchInput_RoundTrip")).click();

          new Select(driver.findElement(By.name("SearchInput$Orig")))
              .selectByValue(trip.getOrigin());
          new Select(driver.findElement(By.name("SearchInput$Dest")))
              .selectByValue(trip.getDestination());

          waitingRandomSec(5);

          driver.findElement(By.name("SearchInput$DeptDate")).click();
View Full Code Here

  public static String getSelectedText(By selectField) {
    return $(selectField).getSelectedText();
  }

  public static Select select(By selectField) {
    return new Select($(selectField));
  }
View Full Code Here

  }

  private void selectOptionByText(WebElement selectField, String optionText) {
    // TODO wait until the element has option with given text
    DOM.waitUntil(selectField, By.tagName("option"), 0, present);
    new Select(selectField).selectByVisibleText(optionText);
  }
View Full Code Here

  }

  private void selectOptionByValue(WebElement selectField, String optionValue) {
    // TODO wait until the element has option with given value
    DOM.waitUntil(selectField, By.tagName("option"), 0, present);
    new Select(selectField).selectByValue(optionValue);
  }
View Full Code Here

    WebElement option = getSelectedOption(selectElement);
    return option == null ? null : option.getText();
  }

  private SelenideElement getSelectedOption(WebElement selectElement) {
    return wrap(new Select(selectElement).getFirstSelectedOption());
  }
View Full Code Here

    return null;
  }

  public static Select select(By selectField) {
    return new Select(getElement(selectField));
  }
View Full Code Here

  }

  protected void selectOptionByText(WebElement selectField, String optionText) {
    $(selectField).should(exist);
    $(selectField).find(byText(optionText)).shouldBe(visible);
    new Select(selectField).selectByVisibleText(optionText);
  }
View Full Code Here

  }

  protected void selectOptionByValue(WebElement selectField, String optionValue) {
    $(selectField).should(exist);
    $(selectField).find(byValue(optionValue)).shouldBe(visible);
    new Select(selectField).selectByValue(optionValue);
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.support.ui.Select

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.