Examples of execute()


Examples of net.mindengine.galen.GalenMain.execute()

       
        File reportsDir = Files.createTempDir();
        String htmlReportPath = reportsDir.getAbsolutePath();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.html";
       
        galen.execute(new GalenArguments()
            .withAction("test")
            .withPaths(asList(getClass().getResource("/suites/to-run/suite-single.test").getFile()))
            .withHtmlReport(htmlReportPath)
            .withTestngReport(testngReportPath)
            );
View Full Code Here

Examples of net.mindengine.galen.runner.JsTestCollector.execute()

            tests.addAll(reader.read(file));
        }
       
        JsTestCollector testCollector = new JsTestCollector(tests);
        for (File jsFile: jsTestFiles) {
            testCollector.execute(jsFile);
        }
       
        testCollector.getEventHandler().invokeBeforeTestSuiteEvents();
       
        runTests(testCollector.getEventHandler(), arguments, tests, listener);
View Full Code Here

Examples of net.mindengine.galen.suite.GalenPageAction.execute()

        WebDriver driver = new MockedDriver();
        driver.get("/mocks/pages/galen4j-pagedump.json");

        GalenPageAction pageAction = new GalenPageActionDumpPage("Test page", "/specs/galen4j/pagedump.spec", pageDumpPath);

        pageAction.execute(null, new SeleniumBrowser(driver), null, null);



        assertFileExists(pageDumpPath + "/page.json");
        assertFileExists(pageDumpPath + "/page.html");
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionCheck.execute()

            throw new UnregisteredTestSession("Cannot check layout as there was no TestSession created");
        }

        TestReport report = session.getReport();
        CompleteListener listener = session.getListener();
        action.execute(report, new SeleniumBrowser(driver), null, listener);
    }
   
    public static File takeScreenshot(WebDriver driver) throws IOException {
        File file = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionCookie.execute()

        MockedBrowser browser = new MockedBrowser("", new Dimension(1024, 768));
       
        GalenPageActionCookie action = new GalenPageActionCookie();
       
        action.setCookies(Arrays.asList("cookieName1=cookieValue1; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/", "cookieName2=cookieValue2; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/"));
        action.execute(new TestReport(), browser, new GalenPageTest(), null);
       
        List<String> recordedActions = browser.getRecordedActions();
       
        assertThat(recordedActions, contains("executeJavascript\ndocument.cookie=\"cookieName1=cookieValue1; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/\";" +
                                                            "document.cookie=\"cookieName2=cookieValue2; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/\";",
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionDumpPage.execute()

        WebDriver driver = new MockedDriver();
        driver.get("/mocks/pages/galen4j-pagedump.json");

        GalenPageAction pageAction = new GalenPageActionDumpPage("Test page", "/specs/galen4j/pagedump.spec", pageDumpPath);

        pageAction.execute(null, new SeleniumBrowser(driver), null, null);



        assertFileExists(pageDumpPath + "/page.json");
        assertFileExists(pageDumpPath + "/page.html");
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionInjectJavascript.execute()

        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"));
       
        assertThat("Inject tags text should be", element.getText(), is("Some injected content"));
        browser.quit();
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionProperties.execute()

        System.getProperties().remove("login.link") ;
        GalenPageActionProperties action = new GalenPageActionProperties();
        action.setFiles(Arrays.asList(findResource("/properties/homepage-en.properties"), findResource("/properties/loginpage-en.properties")));
       
       
        action.execute(new TestReport(), NO_BROWSER, new GalenPageTest(), NO_LISTENER);
       
        assertThat("System property page.title should be", TestSession.current().getProperties().get("page.title"), Matchers.is("Home page"));
        assertThat("System property page.download.caption should be", TestSession.current().getProperties().get("page.download.caption"), Matchers.is("Take it!"));
        assertThat("System property login.link should be", TestSession.current().getProperties().get("login.link"), Matchers.is("Sign in"));
       
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionRunJavascript.execute()

        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());
        action.setJsonArguments("{prefix: 'This was'}");
       
        action.execute(new TestReport(), browser, new GalenPageTest(), null);
       
        assertThat("Search input should contain text", element.getAttribute("value"), is("This was typed by a selenium from javascript text from imported script"));
        browser.quit();
    }
   
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionWait.execute()

                until(UntilType.EXIST, xpath("//div[@id='wqe']")),
                until(UntilType.GONE, css("qweqwewqee"))
                ));
        MockedBrowser browser = new MockedBrowser(null, null);
        browser.setMockedPage(mockedPage);
        wait.execute(new TestReport(), browser, null, null);
    }
   
    @Test
    public void shouldThrowException() throws Exception {
        GalenPageActionWait wait = new GalenPageActionWait();
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.