Package org.openqa.selenium.support.ui

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


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

  protected SelenideElement getSelectedOption(WebElement selectElement) {
    return wrap(new Select(selectElement).getFirstSelectedOption());
  }
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

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

  protected 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

   *
   * @param nomeClinica
   *            Nome da clínica que o usuário vai se conectar.
   */
  public void selecionarClinica(String nomeClinica) {
    Select lista = new Select(Webdriver.obterInstancia().findElement(By.id("selClinicOptions")));
    lista.selectByVisibleText(nomeClinica);
    pressionarBotaoAceitar();
  }
View Full Code Here

    return selectOptions;
  }

  public void selectSecondOption() {
    WebElement selectElement = getWebDriver().findElement(By.id("form:select"));
    Select select = new Select(selectElement);
    select.selectByIndex(1);
  }
View Full Code Here

    return newPage(getClass());
  }

  public void selectSecondOptionOnSecondSelect() {
    WebElement selectElement = getWebDriver().findElement(By.id("form:select2"));
    Select select = new Select(selectElement);
    select.selectByIndex(1);
  }
View Full Code Here

    @Test
    public void getFirstSelectedOption_wraps_on_failure() {

        WebDriver wd = mock(WebDriver.class);
        WebElement we = mock(WebElement.class);
        final Select wdSelect = mock(Select.class);

        final WebDriverException fooE = new WebDriverException("foo");
        doThrow(fooE).when(wdSelect).getFirstSelectedOption();

        FluentSelect select = new FluentSelect(wd, we, Context.singular(null, "dummy"), new Monitor.NULL(), false) {
View Full Code Here

    @Test
    public void isMultiple_delegates() {

        WebDriver wd = mock(WebDriver.class);
        WebElement we = mock(WebElement.class);
        final Select wdSelect = mock(Select.class);

        FluentSelect select = new FluentSelect(wd, we, Context.singular(null, "dummy"), new Monitor.NULL(), false) {
            @Override
            protected Select getSelect() {
                return wdSelect;
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.