Package com.vaadin.testbench.elements

Examples of com.vaadin.testbench.elements.CssLayoutElement


            throw new RuntimeException(
                    "Tried many times but was not able to click the link...");
        }

        $(ButtonElement.class).caption(link).first().click();
        CssLayoutElement content = wrap(CssLayoutElement.class,
                findElement(By.className("valo-content")));
        LabelElement captionElem = content.$(LabelElement.class).first();
        if (!captionElem.getText().equals(caption)) {
            // IE ... why you fail clicks
            System.err.println("Extra click needed on '" + link
                    + "' on remote " + getDesiredCapabilities() + " "
                    + getRemoteControlName());
View Full Code Here


            scrollTo(0, 0);
        }
    }

    private void scrollTo(int top, int left) {
        CssLayoutElement testMenu = $(CssLayoutElement.class).id("testMenu");

        testBenchElement(testMenu).scroll(top);
        testBenchElement(testMenu).scrollLeft(left);
    }
View Full Code Here

public class GridLayoutExtraSpacingTest extends MultiBrowserTest {

    @Test
    public void componentRowFour() throws IOException, Exception {
        openTestURL();
        CssLayoutElement component = $(CssLayoutElement.class).first();
        GridLayoutElement gridLayout = $(GridLayoutElement.class).first();

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

                "2. AbsoluteLayout: left click on This is its caption");
    }

    @Test
    public void clickInCSSLayout() {
        CssLayoutElement layout = $(CssLayoutElement.class).first();

        // click on a text field's caption
        layout.$(TextFieldElement.class).first().click();
        assertLogText("CSSLayout 1st child clicked",
                "1. CSSLayout: left click on This is its caption");

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

                "1. AbsoluteLayout: left click on This is its caption");
    }

    @Test
    public void dragInCSSLayout() {
        CssLayoutElement layout = $(CssLayoutElement.class).first();

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

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

TOP

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

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.