Package com.vaadin.testbench.elements

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


    @Test
    public void testClosePopupRetainText() throws Exception {
        openTestURL();

        ComboBoxElement cb = $(ComboBoxElement.class).first();
        WebElement textbox = cb.findElement(By.vaadin("#textbox"));
        textbox.sendKeys("I");
        cb.openPopup();
        cb.openPopup(); // openPopup() actually toggles
        // The entered value should remain
        assertEquals("I", textbox.getAttribute("value"));
View Full Code Here


    @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
        // is opened
View Full Code Here

        int i = 0;
        while (i < 3) {
            assertTrue("No item added on focus", cBox.getPopupSuggestions()
                    .contains("Focus" + i++));
            focusTarget.focus();
            ((TestBenchElement) cBox.findElement(By.vaadin("#textbox")))
                    .focus();
        }
        assertTrue("No item added on focus", cBox.getPopupSuggestions()
                .contains("Focus" + i));
    }
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.