Examples of JsBrowserFactory


Examples of net.mindengine.galen.browser.JsBrowserFactory

    private static GalenPageTest jsBrowserFactory(String title, String[] args) {
        if (args.length < 2) {
            throw new SyntaxException("Missing script path");
        }
        return new GalenPageTest()
            .withBrowserFactory(new JsBrowserFactory(args[1], stripFirst(2, args)))
            .withTitle(title);
    }
View Full Code Here

Examples of net.mindengine.galen.browser.JsBrowserFactory

                       .withDesiredCapability("device-orientation", "portrait")
                       .withDesiredCapability("platform", "OS X 10.0"))),
                      
                      
           test("jsfactory script.js http://example.com 640x480", new GalenPageTest()
                   .withBrowserFactory(new JsBrowserFactory("script.js", new String[]{"http://example.com", "640x480"})))
        };
    }
View Full Code Here

Examples of net.mindengine.galen.browser.JsBrowserFactory

public class JsBrowserFactoryTest {

    @Test
    public void shouldProvide_webDriver_withJsFactory() {
        JsBrowserFactory browserFactory = new JsBrowserFactory(getClass().getResource("/browser/js-driver-init.js").getFile(), new String[]{"http://example.com", "640x480"});
       
        SeleniumBrowser browser = (SeleniumBrowser)browserFactory.openBrowser();
       
        DummyDriver driver = (DummyDriver)browser.getDriver();
       
        Assert.assertEquals("http://example.com", driver.getCurrentUrl());
    }
View Full Code Here

Examples of net.mindengine.galen.browser.JsBrowserFactory

        Assert.assertEquals("http://example.com", driver.getCurrentUrl());
    }
   
    @Test
    public void shouldProvide_browser_withJsFactory() {
        JsBrowserFactory browserFactory = new JsBrowserFactory(getClass().getResource("/browser/js-browser-init.js").getFile(), new String[]{"http://example2.com"});
       
        MockedBrowser browser = (MockedBrowser)browserFactory.openBrowser();
        Assert.assertEquals("http://example2.com", browser.getUrl());
        Assert.assertEquals(new Dimension(320, 240), browser.getScreenSize());
    }
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.