Package net.mindengine.galen.components.validation

Examples of net.mindengine.galen.components.validation.MockedPageElement


       
        GalenPageRunner pageRunner = new GalenPageRunner(new TestReport());
       
        Map<String, PageElement> pageElements = new HashMap<String, PageElement>();

        pageElements.put("objectA1", new MockedPageElement(10, 10, 100, 50));
        pageElements.put("objectA2", new MockedPageElement(200, 300, 50, 30));
        pageElements.put("objectB1", new MockedPageElement(10, 10, 100, 50));
        pageElements.put("objectB2", new MockedPageElement(200, 300, 50, 30));
        pageElements.put("sub-objectA1", new MockedPageElement(200, 300, 50, 30));
       
        MockedPageValidation pageValidation = new MockedPageValidation(pageElements);
       
       
       
View Full Code Here


        GalenPageActionCheck check = new GalenPageActionCheck();
        check.setSpecs(Arrays.asList(getClass().getResource("/specs/spec-conditional-simple.spec").getFile()));
       
        MockedBrowser mockedBrowser = new MockedBrowser("http://galenframework.com", new Dimension(640, 480));
        mockedBrowser.setMockedPage(new MockedPage(new HashMap<String, PageElement>(){{
            put("textfield", new MockedPageElement(0, 0, 100, 100));
            put("button-1", new MockedPageElement(0, 0, 200, 100));
            put("button-2", new MockedPageElement(0, 100, 200, 10));
        }}));
       
        TestValidationListener validationListener = new TestValidationListener();
       
        TestReport report = new TestReport();
View Full Code Here

        GalenPageActionCheck check = new GalenPageActionCheck();
        check.setSpecs(Arrays.asList(getClass().getResource("/specs/spec-conditional-simple-inverted.spec").getFile()));
       
        MockedBrowser mockedBrowser = new MockedBrowser("http://galenframework.com", new Dimension(640, 480));
        mockedBrowser.setMockedPage(new MockedPage(new HashMap<String, PageElement>(){{
            put("textfield", new MockedPageElement(0, 0, 100, 100));
            put("button-1", new MockedPageElement(0, 0, 200, 100));
            put("button-2", new MockedPageElement(0, 100, 200, 10));
        }}));
       
       
        TestValidationListener validationListener = new TestValidationListener();
        check.execute(new TestReport(), mockedBrowser, new GalenPageTest(), validationListener);
View Full Code Here

        GalenPageActionCheck check = new GalenPageActionCheck();
        check.setSpecs(Arrays.asList(getClass().getResource("/specs/spec-conditional-simple-inverted.spec").getFile()));
       
        MockedBrowser mockedBrowser = new MockedBrowser("http://galenframework.com", new Dimension(640, 480));
        mockedBrowser.setMockedPage(new MockedPage(new HashMap<String, PageElement>(){{
            put("textfield", new MockedPageElement(0, 0, 100, 100));
            put("button-1", new MockedInvisiblePageElement(0, 0, 100, 100));
            put("button-2", new MockedInvisiblePageElement(0, 0, 100, 100));
        }}));

       
View Full Code Here

        GalenPageActionCheck check = new GalenPageActionCheck();
        check.setSpecs(Arrays.asList(getClass().getResource("/specs/spec-conditional-simple.spec").getFile()));
       
        MockedBrowser mockedBrowser = new MockedBrowser("http://galenframework.com", new Dimension(640, 480));
        mockedBrowser.setMockedPage(new MockedPage(new HashMap<String, PageElement>(){{
            put("textfield", new MockedPageElement(0, 0, 100, 100));
            put("button-1", new MockedInvisiblePageElement(0, 0, 100, 100));
            put("button-2", new MockedInvisiblePageElement(0, 0, 100, 100));
        }}));

       
View Full Code Here

    private MockedPage page(HashMap<String, PageElement> elements, BufferedImage screenshotImage) {
        return new MockedPage(elements, screenshotImage);
    }

    private MockedPageElement element(int left, int top, int width, int height) {
        return new MockedPageElement(left, top, width, height);
    }
View Full Code Here

    private MockedPageElement element(int left, int top, int width, int height) {
        return new MockedPageElement(left, top, width, height);
    }

    private PageElement elementWithCss(String cssPropertyName, String value) {
        return new MockedPageElement(10,10,10,10).withCssProperty(cssPropertyName, value);
    }
View Full Code Here

        GalenPageActionCheck check = new GalenPageActionCheck();
        check.setSpecs(Arrays.asList(getClass().getResource("/specs/spec-conditional-simple-otherwise.spec").getFile()));
       
        MockedBrowser mockedBrowser = new MockedBrowser("http://galenframework.com", new Dimension(640, 480));
        mockedBrowser.setMockedPage(new MockedPage(new HashMap<String, PageElement>(){{
            put("textfield", new MockedPageElement(0, 0, 100, 100));
            put("button-1", new MockedInvisiblePageElement(0, 0, 100, 100));
            put("button-2", new MockedInvisiblePageElement(0, 0, 100, 100));
        }}));

       
View Full Code Here

    protected PageElement invisibleElement() {
        return new MockedInvisiblePageElement(0, 0, 0, 0);
    }

    protected PageElement visibleElement() {
        return new MockedPageElement(0, 0, 0, 0);
    }
View Full Code Here

TOP

Related Classes of net.mindengine.galen.components.validation.MockedPageElement

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.