Package com.vaadin.testbench.elements

Examples of com.vaadin.testbench.elements.CheckBoxElement


    @Test
    public void numberOfRpcCallsIsEqualToClicks() {
        openTestURL();

        CheckBoxElement checkBoxElement = $(CheckBoxElement.class).first();
        WebElement labelElem = checkBoxElement.findElement(By.tagName("label"));
        WebElement inputElem = checkBoxElement.findElement(By.tagName("input"));
        final WebElement countElem = $(LabelElement.class).id("count-label");

        // Click on the actual checkbox.
        inputElem.click();
        // Have to use waitUntil to make this test more stable.
View Full Code Here


        // Spacing on, not hiding empty rows/columns
        // There should be 3 * 6px spacing (red) above the csslayout
        verifySpacingAbove(3 * 6, gridLayout, component);

        CheckBoxElement spacingCheckbox = $(CheckBoxElement.class).caption(
                "spacing").first();
        check(spacingCheckbox);

        // Spacing off, not hiding empty rows/columns
        // There should not be any spacing (red) above the csslayout
        verifySpacingAbove(0, gridLayout, component);

        CheckBoxElement hideRowsColumnsCheckbox = $(CheckBoxElement.class)
                .caption("hide empty rows/columns").first();
        check(hideRowsColumnsCheckbox);

        // Spacing off, hiding empty rows/columns
        // There should not be any spacing (red) above the csslayout
View Full Code Here

    @Test
    public void testViewportUnchanged() throws IOException {
        openTestURL();

        CheckBoxElement checkbox = $(CheckBoxElement.class).first();

        WebElement row = $(TableElement.class).first().getCell(190, 0);
        final WebElement scrollPositionDisplay = getDriver().findElement(
                By.className("v-table-scrollposition"));
        waitUntilNot(new ExpectedCondition<Boolean>() {

            @Override
            public Boolean apply(WebDriver input) {
                return scrollPositionDisplay.isDisplayed();
            }
        }, 10);

        int rowLocation = row.getLocation().getY();

        // use click x,y with non-zero offset to actually toggle the checkbox. (#13763)
        checkbox.click(5, 5);
        int newRowLocation = row.getLocation().getY();

        assertThat(newRowLocation, is(rowLocation));

    }
View Full Code Here

TOP

Related Classes of com.vaadin.testbench.elements.CheckBoxElement

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.