Examples of GalenPageActionInjectJavascript


Examples of net.mindengine.galen.suite.actions.GalenPageActionInjectJavascript

import net.mindengine.galen.suite.actions.GalenPageActionRunJavascript;

public class GalenPageActions {

    public static GalenPageActionInjectJavascript injectJavascript(String javascriptFilePath) {
        return new GalenPageActionInjectJavascript(javascriptFilePath);
    }
View Full Code Here

Examples of net.mindengine.galen.suite.actions.GalenPageActionInjectJavascript

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