Package net.mindengine.galen.browser

Examples of net.mindengine.galen.browser.Browser.load()


            if (arguments.getScreenSize() != null) {
                browser.changeWindowSize(arguments.getScreenSize());
            }

            browser.load(arguments.getUrl());

            Galen.dumpPage(browser, arguments.getUrl(), arguments.getPaths().get(0), arguments.getExport(), arguments.getMaxWidth(), arguments.getMaxHeight());
            System.out.println("Done!");
        }
        catch (Exception ex) {
View Full Code Here


    private static final String TEST_URL = "file://" + GalenPageActionCheckTest.class.getResource("/html/page-for-js-check.html").getPath();
   
    @Test public void shouldRun_javascriptFile_andPerformActions_onBrowser() throws Exception {
        WebDriver driver = new FirefoxDriver();
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
       
        WebElement element = driver.findElement(By.id("search-query"));
        assertThat("Search input should not contain any text yet", element.getAttribute("value"), is(""));
       
        GalenPageActionRunJavascript action = new GalenPageActionRunJavascript(getClass().getResource("/scripts/to-run-1.js").getFile());
View Full Code Here

    private static final String TEST_URL = "file://" + GalenPageActionCheckTest.class.getResource("/html/page1.html").getPath();
   
    @Test public void shouldInject_javascript() throws IOException {
        WebDriver driver = new FirefoxDriver();
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
       
        GalenPageActionInjectJavascript action = new GalenPageActionInjectJavascript("/scripts/to-inject-1.js");
        action.execute(new TestReport(), browser, new GalenPageTest(), null);
       
        WebElement element = driver.findElement(By.xpath("//body/injected-tag"));
View Full Code Here

        GalenPageActionCheck action = new GalenPageActionCheck()
            .withIncludedTags(asList("mobile"))
            .withSpecs(asList("/html/page.spec"));
       
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
        browser.changeWindowSize(new Dimension(400, 800));
       
        action.execute(new TestReport(), browser, new GalenPageTest(), validationListener);
       
        driver.quit();
View Full Code Here

            .withIncludedTags(asList("mobile"))
            .withExcludedTags(asList("debug"))
            .withSpecs(asList("/html/page-exclusion.spec"));
   
        Browser browser = new SeleniumBrowser(driver);
        browser.load(TEST_URL);
        browser.changeWindowSize(new Dimension(400, 800));
       
        action.execute(new TestReport(), browser, new GalenPageTest(), validationListener);
        driver.quit();
       
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.