Package com.vaadin.testbench.elements

Examples of com.vaadin.testbench.elements.AbsoluteLayoutElement


                "2. VerticalLayout: left click on This is label 3");
    }

    @Test
    public void clickInAbsoluteLayout() {
        AbsoluteLayoutElement layout = $(AbsoluteLayoutElement.class).first();

        // click on a button that has its own ClickListener (should be ignored
        // by the LayoutClickListener)
        layout.$(ButtonElement.class).first().click();
        assertLogText("A button with a ClickListener clicked",
                "1. Button A button with its own click listener was clicked");

        // click on a text field's caption
        layout.$(TextFieldElement.class).first().click();
        assertLogText("AbsoluteLayout 1st child was clicked",
                "2. AbsoluteLayout: left click on This is its caption");
    }
View Full Code Here


                "1. VerticalLayout: left click on This is tf5");
    }

    @Test
    public void dragInAbsoluteLayout() {
        AbsoluteLayoutElement layout = $(AbsoluteLayoutElement.class).first();

        // Drag inside the first text field's caption
        new Actions(getDriver())
                .moveToElement(layout.$(TextFieldElement.class).first(), 21, 9)
                .clickAndHold().moveByOffset(-10, 0).release().perform();
        assertLogText("Mouse dragged in AbsoluteLayout",
                "1. AbsoluteLayout: left click on This is its caption");

        // Drag from a text field to another text field
        new Actions(getDriver())
                .moveToElement(layout.$(TextFieldElement.class).get(1), 54, 7)
                .clickAndHold()
                .moveToElement(layout.$(TextFieldElement.class).first(), 52, 10)
                .release().perform();
        assertLogText("Expected the drag to be ignored between elements",
                "1. AbsoluteLayout: left click on This is its caption");
    }
View Full Code Here

TOP

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

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.