Package net.mindengine.galen.browser

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


        }
       
        SeleniumBrowser browser = (SeleniumBrowser) new SeleniumBrowserFactory(browserType).openBrowser();
       
        if (url != null && !url.trim().isEmpty()) {
            browser.load(url);   
        }
       
        if (size != null && !size.trim().isEmpty()) {
            browser.changeWindowSize(GalenUtils.readSize(size));
        }
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.