Package com.vaadin.testbench

Examples of com.vaadin.testbench.TestBenchElement.click()


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

        TestBenchElement cell = $(TableElement.class).first().getCell(3, 0);
        cell.click();

        TestBenchElement button = $(ButtonElement.class).first();
        button.focus();

        int buttonLocation = button.getLocation().getY();
View Full Code Here


        TestBenchElement button = $(ButtonElement.class).first();
        button.focus();

        int buttonLocation = button.getLocation().getY();

        button.click();

        int newButtonLocation = button.getLocation().getY();

        assertThat(
                "Button location has changed after table refresh, window has scrolled and it shouldn't have",
View Full Code Here

    public void testScroll() throws InterruptedException, IOException {
        openTestURL();

        TestBenchElement tab = (TestBenchElement) getDriver().findElement(
                By.className("v-tabsheet-tabitemcell"));
        tab.click(10, 10);

        Point oldLocation = tab.getLocation();

        tab.sendKeys(Keys.SPACE);
View Full Code Here

        List<WebElement> scrollElements = getDriver().findElements(
                By.className("v-tabsheet-scrollerNext"));
        if (!scrollElements.isEmpty()) {
            TestBenchElement rightScrollElement = (TestBenchElement) scrollElements
                    .get(0);
            rightScrollElement.click(5, 5);
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

        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
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.