Examples of selectByIndex()


Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    public void setMultiLingual(boolean isMultiLingual)
    {
        Select select = new Select(this.multiLingualSelect);
        if (isMultiLingual) {
            select.selectByIndex(1);
        } else {
            select.selectByIndex(2);
        }
    }
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    {
        Select select = new Select(this.multiLingualSelect);
        if (isMultiLingual) {
            select.selectByIndex(1);
        } else {
            select.selectByIndex(2);
        }
    }

    public void setDefaultLanguages(String defaultLanguages)
    {
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

        Select rightColor = new Select(page.getSelectRightColor());
        Select textColor = new Select(page.getSelectTextColor());
        for (ImageState state : ImageState.values()) {
            leftColor.selectByIndex(state.getLeftColor().getIndex());
            rightColor.selectByIndex(state.getRightColor().getIndex());
            textColor.selectByIndex(state.getTextColor().getIndex());
            page.getSubmitButton().click();
            testImage(
                    state.getLeftColor().getValue(),
                    state.getRightColor().getValue(),
                    state.getTextColor().getValue());
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    }

    @Test
    public void testLogAndClear() {
        Select select = new Select(page.getSeveritySelect());
        select.selectByIndex(LogPage.Severity.INFO.getIndex());
        page.getSubmit().click();
        Graphene
            .waitAjax()
            .until(
                "After setting severity to <info> and submitting, the logging area should contain a message with severity <info>.")
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    }

    @Test
    public void testLogDebug() {
        Select select = new Select(page.getSeveritySelect());
        select.selectByIndex(LogPage.Severity.DEBUG.getIndex());
        page.getSubmit().click();
        Graphene
            .waitAjax()
            .until(
                "After setting severity to <debug> and submitting, the logging area should contain a message with severity <debug>.")
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    }

    @Test
    public void testLogError() {
        Select select = new Select(page.getSeveritySelect());
        select.selectByIndex(LogPage.Severity.ERROR.getIndex());
        page.getSubmit().click();
        Graphene.waitAjax()
            .until("After setting severity to <error> and submitting, the logging area should contain no message.")
            .element(page.getLoggingArea()).text().equalTo("");
    }
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    }

    @Test
    public void testLogInfo() throws InterruptedException {
        Select select = new Select(page.getSeveritySelect());
        select.selectByIndex(LogPage.Severity.INFO.getIndex());
        page.getSubmit().click();
        Thread.sleep(400); // workaround till ARQGRA-259 is resolved
        Graphene
            .waitAjax()
            .until(
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

    }

    @Test
    public void testLogWarn() {
        Select select = new Select(page.getSeveritySelect());
        select.selectByIndex(LogPage.Severity.WARN.getIndex());
        page.getSubmit().click();
        Graphene.waitAjax()
            .until("After setting severity to <warn> and submitting, the logging area should contain no message.")
            .element(page.getLoggingArea()).text().equalTo("");
    }
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

        Assert.assertEquals(new Long(4), plistBox2.getValue(3));
        Assert.assertEquals(new Long(5), plistBox2.getValue(4));
        Assert.assertEquals(new Long(6), plistBox2.getValue(5));

        final Select select2 = new Select(listBox2);
        select2.selectByIndex(4); // select item5

        final PChangeEvent e2 = eventsListener.poll();
        Assert.assertNotNull(e2);

        Assert.assertEquals(4, plistBox2.getSelectedIndex());
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select.selectByIndex()

  }

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

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.