Examples of findElement()


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

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

        NotificationElement notification = $(NotificationElement.class).first();
        assertEquals("Scrolled to 1000 px",
                notification.findElement(By.tagName("h1")).getText());

        // attempt to close the notification
        try {
            notification.closeNotification();
        } catch (StaleElementReferenceException e) {
View Full Code Here

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

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

        notification = $(NotificationElement.class).first();
        assertEquals("Scrolled to 1020 px",
                notification.findElement(By.tagName("h1")).getText());

        try {
            notification.closeNotification();
        } catch (StaleElementReferenceException e) {
        }
View Full Code Here

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

        decreaseSize.click(); // decreasing container size from 40 to 30

        TableElement table = $(TableElement.class).first();
        // TableElement scroll not working properly, so we need to do this.
        // http://dev.vaadin.com/ticket/13826
        testBenchElement(table.findElement(By.className("v-scrollable")))
                .scroll(1000);

        // waitforvaadin not worky currently for table scroll, so we need to use
        // thread sleep :(
        Thread.sleep(1500);
View Full Code Here

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

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

        TableElement table = $(TableElement.class).first();
        List<WebElement> rows = table.findElement(By.className("v-table-body"))
                .findElements(By.tagName("tr"));
        assertEquals("unexpect amount of rows", 46, rows.size());

        // click the button on the first visible row
        clickButton(table, 0, 3, "1. Button Button999 clicked");
View Full Code Here

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

        // initialise contents
        button.click();
        sleep(500);

        List<WebElement> rows = table.findElement(By.className("v-table-body"))
                .findElements(By.tagName("tr"));

        // check that the final row is the one intended
        WebElement finalRow = rows.get(rows.size() - 1);
        WebElement label = finalRow.findElement(By.className("v-label"));
View Full Code Here

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

        // add more rows
        button.click();
        sleep(500);

        rows = table.findElement(By.className("v-table-body")).findElements(
                By.tagName("tr"));

        // check that the final row is the one intended
        finalRow = rows.get(rows.size() - 1);
        label = finalRow.findElement(By.className("v-label"));
View Full Code Here

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

        });
    }

    private int getTextFieldWidth() {
        TableElement table = getTable();
        final WebElement textField = table.findElement(By.className("v-textfield"));

        return textField.getSize().width;
    }

    private TableElement getTable() {
View Full Code Here

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

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

        TreeTableElement treeTable = $(TreeTableElement.class).first();
        List<WebElement> rows = treeTable.findElement(
                By.className("v-table-body")).findElements(By.tagName("tr"));
        assertEquals("unexpected row count", 4, rows.size());
        assertEquals("unexpected contents", "root1", treeTable.getCell(0, 0)
                .getText());
        assertEquals("unexpected contents", "root2", treeTable.getCell(1, 0)
View Full Code Here

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

        // expand first row, should have 10 children
        treeTable.getCell(0, 0)
                .findElement(By.className("v-treetable-treespacer")).click();

        treeTable = $(TreeTableElement.class).first();
        rows = treeTable.findElement(By.className("v-table-body"))
                .findElements(By.tagName("tr"));
        assertEquals("unexpected row count", 14, rows.size());

        // expand root3, should have 200 children
        assertEquals("unexpected contents", "root3", treeTable.getCell(12, 0)
View Full Code Here

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

                .getText());
        treeTable.getCell(11, 0)
                .findElement(By.className("v-treetable-treespacer")).click();

        treeTable = $(TreeTableElement.class).first();
        rows = treeTable.findElement(By.className("v-table-body"))
                .findElements(By.tagName("tr"));
        assertEquals("unexpected row count", 414, rows.size());

        // scroll all the way to the bottom
        WebElement ui = findElement(By.className("v-ui"));
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.