Package org.seleniuminspector

Examples of org.seleniuminspector.ElementInspector.assertExpressionEquals()


        Dimension windowSize = window().size();

        ElementInspector content = element("formID:borderLayoutPanel0::content");
        int width = content.evalIntExpression("offsetWidth");
        int height = content.evalIntExpression("offsetHeight");
        content.assertExpressionEquals("offsetWidth", windowSize.width / 2 - 6, 1);
        content.assertExpressionEquals("offsetHeight", windowSize.height / 2 - 5, 1);
        window().evalExpression("resizeBy(-100, -100)");
        sleep(2000);
        selenium.waitForCondition("window.document.getElementById('textDiv').innerHTML == \"window resized\"", "10000");
        content.assertExpressionEquals("offsetWidth", width - 50);
View Full Code Here


        ElementInspector content = element("formID:borderLayoutPanel0::content");
        int width = content.evalIntExpression("offsetWidth");
        int height = content.evalIntExpression("offsetHeight");
        content.assertExpressionEquals("offsetWidth", windowSize.width / 2 - 6, 1);
        content.assertExpressionEquals("offsetHeight", windowSize.height / 2 - 5, 1);
        window().evalExpression("resizeBy(-100, -100)");
        sleep(2000);
        selenium.waitForCondition("window.document.getElementById('textDiv').innerHTML == \"window resized\"", "10000");
        content.assertExpressionEquals("offsetWidth", width - 50);
        content.assertExpressionEquals("offsetHeight", height - 50);
View Full Code Here

        content.assertExpressionEquals("offsetWidth", windowSize.width / 2 - 6, 1);
        content.assertExpressionEquals("offsetHeight", windowSize.height / 2 - 5, 1);
        window().evalExpression("resizeBy(-100, -100)");
        sleep(2000);
        selenium.waitForCondition("window.document.getElementById('textDiv').innerHTML == \"window resized\"", "10000");
        content.assertExpressionEquals("offsetWidth", width - 50);
        content.assertExpressionEquals("offsetHeight", height - 50);
    }

}
View Full Code Here

        content.assertExpressionEquals("offsetHeight", windowSize.height / 2 - 5, 1);
        window().evalExpression("resizeBy(-100, -100)");
        sleep(2000);
        selenium.waitForCondition("window.document.getElementById('textDiv').innerHTML == \"window resized\"", "10000");
        content.assertExpressionEquals("offsetWidth", width - 50);
        content.assertExpressionEquals("offsetHeight", height - 50);
    }

}
View Full Code Here

        SidePanelInspector sidePanel = sidePanel("formID:eventsSidePanelId");
        ElementInspector sidePanelText = element("sidePanelTextId");

        /* test onsplitterdrag */
        sidePanelText.assertExpressionEquals("innerHTML", "size = 50%");
        sidePanel.splitter().dragAndDrop(0, -50);
        sidePanelText.assertExpressionEquals("innerHTML", "size = 25%");

        /* test oncollapse */
        sidePanel.splitter().mouseDown();
View Full Code Here

        ElementInspector sidePanelText = element("sidePanelTextId");

        /* test onsplitterdrag */
        sidePanelText.assertExpressionEquals("innerHTML", "size = 50%");
        sidePanel.splitter().dragAndDrop(0, -50);
        sidePanelText.assertExpressionEquals("innerHTML", "size = 25%");

        /* test oncollapse */
        sidePanel.splitter().mouseDown();
        sidePanel.splitter().mouseUp();
        sidePanelText.assertExpressionEquals("innerHTML", "size panel is collapsed");
View Full Code Here

        sidePanelText.assertExpressionEquals("innerHTML", "size = 25%");

        /* test oncollapse */
        sidePanel.splitter().mouseDown();
        sidePanel.splitter().mouseUp();
        sidePanelText.assertExpressionEquals("innerHTML", "size panel is collapsed");

        /* test onrestore */
        sidePanel.splitter().mouseDown();
        sidePanel.splitter().mouseUp();
        sidePanelText.assertExpressionEquals("innerHTML", "size panel is restored");
View Full Code Here

        sidePanelText.assertExpressionEquals("innerHTML", "size panel is collapsed");

        /* test onrestore */
        sidePanel.splitter().mouseDown();
        sidePanel.splitter().mouseUp();
        sidePanelText.assertExpressionEquals("innerHTML", "size panel is restored");
    }

     @Test
    public void testFixedSidePanels() {
        testAppFunctionalPage("/components/borderlayoutpanel/sidePanelft.jsf");
View Full Code Here

    public void testClientSideAPI() {
        testAppFunctionalPage("/components/borderlayoutpanel/sidePanelft.jsf");
        ElementInspector sidePanel = element("formID:defaultSidePanelId");

        sidePanel.evalExpression("resize('25%');");
        sidePanel.assertExpressionEquals("_size", "25%");
        sidePanel.evalExpression("collapse();");
        sidePanel.assertExpressionEquals("_size", "7px");
        sidePanel.evalExpression("restore();");
        sleep(1000);
        sidePanel.assertExpressionEquals("_size", "25%");
View Full Code Here

        ElementInspector sidePanel = element("formID:defaultSidePanelId");

        sidePanel.evalExpression("resize('25%');");
        sidePanel.assertExpressionEquals("_size", "25%");
        sidePanel.evalExpression("collapse();");
        sidePanel.assertExpressionEquals("_size", "7px");
        sidePanel.evalExpression("restore();");
        sleep(1000);
        sidePanel.assertExpressionEquals("_size", "25%");
    }
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.