Package com.vaadin.testbench

Examples of com.vaadin.testbench.TestBenchElement


        TableElement table = $(TableElement.class).first();
        List<CheckBoxElement> checkboxes = $(CheckBoxElement.class).all();
        assertEquals(3, checkboxes.size());

        TestBenchElement cell_3_0 = table.getCell(3, 0);

        // move to the center of the cell
        new Actions(getDriver()).moveToElement(cell_3_0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Cell description item 3, Text");
        clearTooltip();

        // move outside the cell
        new Actions(getDriver()).moveToElement(checkboxes.get(2)).perform();

        // move to the corner of the cell
        new Actions(getDriver()).moveToElement(cell_3_0, 0, 0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Cell description item 3, Text");
        clearTooltip();

        // uncheck cell tooltips
        checkboxes.get(1).findElement(By.tagName("input")).click();

        TestBenchElement cell_1_1 = table.getCell(1, 1);

        // move to the center of the cell
        new Actions(getDriver()).moveToElement(cell_1_1).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Button 1 description");
        clearTooltip();

        // move to the corner of the element, outside of the button
        new Actions(getDriver()).moveToElement(cell_1_1, 0, 0).perform();
        sleep(1000);

        // ensure the tooltip is present
        checkTooltip("Row description item 1");
        clearTooltip();

        // check cell tooltips
        checkboxes.get(1).findElement(By.tagName("input")).click();

        TestBenchElement cell_4_2 = table.getCell(4, 2);

        // move to the center of the cell
        new Actions(getDriver()).moveToElement(cell_4_2).perform();
        sleep(1000);
View Full Code Here


        openTestURL();

        TableElement table = $(TableElement.class).first();

        // check original value
        TestBenchElement cell_1_0 = table.getCell(1, 0);
        assertEquals(
                "original value not found, wrong cell or contents (1st column of the 2nd row expected)",
                "Teppo", cell_1_0.getText());

        // double-click to edit cell contents
        cell_1_0.click();
        new Actions(getDriver()).doubleClick(cell_1_0).build().perform();
        sleep(100);

        // fetch the updated cell
        WebElement textField = table.getCell(1, 0).findElement(
View Full Code Here

TOP

Related Classes of com.vaadin.testbench.TestBenchElement

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.