Package com.vaadin.testbench.elements

Examples of com.vaadin.testbench.elements.ButtonElement.click()


        assertEquals("unexpected day content", "6", days.get(8).getText());
        assertEquals("unexpected day content", "23", days.get(25).getText());
        assertEquals("unexpected day content", "8", days.get(41).getText());

        // close the popup by clicking an unrelated element
        button.click();

        assertFalse("popup found when there should be none",
                isElementPresent(By.className("v-datefield-popup")));
    }
View Full Code Here


        ComboBoxElement comboBox = $(ComboBoxElement.class).first();
        String oldStyle = comboBox.getAttribute("style");

        ButtonElement button = $(ButtonElement.class).first();
        button.click();
        String newStyle = comboBox.getAttribute("style");

        assertEquals("width has changed, should remain equal", oldStyle,
                newStyle);
View Full Code Here

        postfix.clear();
        postfix.sendKeys("- press ESC to close");

        type.selectByText(NotificationRole.ALERT.toString());

        show.click();
        waitForElementPresent(By.className("v-Notification"));

        NotificationElement notification = $(NotificationElement.class).first();

        String text = notification.getAttribute("role");
View Full Code Here

        } catch (Exception e) {
        }

        type.selectByText("STATUS");

        show.click();
        waitForElementPresent(By.className("v-Notification"));

        notification = $(NotificationElement.class).first();

        text = notification.getAttribute("role");
View Full Code Here

        }

        prefix.clear();
        postfix.clear();

        show.click();
        waitForElementPresent(By.className("v-Notification"));

        WebElement element;
        try {
            element = getDriver()
View Full Code Here

        ButtonElement marginBtn = $(ButtonElement.class).get(0);
        ButtonElement spaceBtn = $(ButtonElement.class).get(1);
        marginBtn.click();
        sleep(1000);
        compareScreen(states[0]);
        spaceBtn.click();
        sleep(1000);
        compareScreen(states[1]);
    }
}
View Full Code Here

                By.className("v-textfield"));
        ButtonElement button = $(ButtonElement.class).first();

        dateTextbox.sendKeys("01/01/01", Keys.TAB);
        assertLogText("1. valueChange: value: 01/01/01, is valid: true");
        button.click();
        assertLogText("2. buttonClick: value: 01/01/01, is valid: true");

        dateTextbox.sendKeys("lala", Keys.TAB);
        assertLogText("3. valueChange: value: null, is valid: false");
        button.click();
View Full Code Here

        button.click();
        assertLogText("2. buttonClick: value: 01/01/01, is valid: true");

        dateTextbox.sendKeys("lala", Keys.TAB);
        assertLogText("3. valueChange: value: null, is valid: false");
        button.click();
        assertLogText("4. buttonClick: value: null, is valid: false");

        dateTextbox.clear();
        dateTextbox.sendKeys("02/02/02", Keys.TAB);
        assertLogText("5. valueChange: value: 02/02/02, is valid: true");
View Full Code Here

        assertLogText("4. buttonClick: value: null, is valid: false");

        dateTextbox.clear();
        dateTextbox.sendKeys("02/02/02", Keys.TAB);
        assertLogText("5. valueChange: value: 02/02/02, is valid: true");
        button.click();
        assertLogText("6. buttonClick: value: 02/02/02, is valid: true");
    }

    private void assertLogText(String expected) throws Exception {
        String text = findElement(By.vaadin("PID_SLog_row_0")).getText();
View Full Code Here

        Assert.assertFalse("Descending indicator was prematurely visible",
                getHeaderClasses(table).contains(TABLE_HEADER_DESC_INDICATOR));
        Assert.assertFalse("Ascending indicator was prematurely visible",
                getHeaderClasses(table).contains(TABLE_HEADER_ASC_INDICATOR));

        button.click();
        Assert.assertTrue("Indicator did not become visible",
                getHeaderClasses(table).contains(TABLE_HEADER_DESC_INDICATOR));
        Assert.assertFalse("Ascending sort indicator was wrongly visible",
                getHeaderClasses(table).contains(TABLE_HEADER_ASC_INDICATOR));
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.