Package com.vaadin.testbench.elements

Examples of com.vaadin.testbench.elements.ComboBoxElement.selectByText()


    @Test
    public void testClosePopupRetainText_selectingAValue() throws Exception {
        openTestURL();
        ComboBoxElement cb = $(ComboBoxElement.class).first();
        cb.selectByText("Item 3");
        WebElement textbox = cb.findElement(By.vaadin("#textbox"));
        textbox.clear();
        textbox.sendKeys("I");
        cb.openPopup();
        // Entered value should remain in the text field even though the popup
View Full Code Here


    public void defaultComboBoxClearsInputOnInvalidValue() {
        ComboBoxElement comboBox = getComboBox("default");

        assertThat(getComboBoxValue(comboBox), is(""));

        comboBox.selectByText("Value 1");
        sendKeysToComboBox(comboBox, "abc");

        removeFocusFromComboBoxes();

        assertThat(getComboBoxValue(comboBox), is("Value 1"));
View Full Code Here

    public void comboBoxWithPromptClearsInputOnInvalidValue() {
        ComboBoxElement comboBox = getComboBox("default-prompt");

        assertThat(getComboBoxValue(comboBox), is("Please select"));

        comboBox.selectByText("Value 2");
        sendKeysToComboBox(comboBox, "def");

        removeFocusFromComboBoxes();

        assertThat(getComboBoxValue(comboBox), is("Value 2"));
View Full Code Here

        openTestURL();

        ComboBoxElement comboBoxWebElement = $(ComboBoxElement.class).first();

        comboBoxWebElement.openNextPage();
        comboBoxWebElement.selectByText("Item 19");

        assertThat($(LabelElement.class).id("value").getText(), is("Item 19"));
    }
}
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.