Examples of executeJavaScript()


Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScript()

        assertThat(frame.getByXPath("//span[contains(@class,'failed')]").size(), equalTo(0));
        assertThat(frame.getByXPath("//span[contains(@class,'skipped')]").size(), equalTo(0));
        assertThat(passed.get(0).asText(), equalTo("16 specs, 0 failures"));

        //Store Report
        ScriptResult result = frame.executeJavaScript("jscoverage_report();");

        //Verify coverage
        page.getHtmlElementById("summaryTab").click();
        webClient.waitForBackgroundJavaScript(2000);
        assertEquals("100%", page.getElementById("summaryTotal").getTextContent());
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScript()

     * @throws Exception if anything goes wrong
     */
    private static void runSanityCheck() throws Exception {
        final WebClient webClient = new WebClient();
        final HtmlPage page = webClient.getPage("http://htmlunit.sourceforge.net/index.html");
        page.executeJavaScript("document.location");
        System.out.println("Sanity check complete.");
    }

    /**
     * Returns "HTMLUnit".
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScript()

    for (int i = 0; i < args.length; i++) {
      parameters[i] = parseArgumentIntoJavsacriptParameter(args[i]);
    }

    script = "function() {" + script + "};";
    ScriptResult result = page.executeJavaScript(script);
    Function func = (Function) result.getJavaScriptResult();

    result = page.executeJavaScriptFunctionIfPossible(
        func,
        (ScriptableObject) currentWindow.getScriptObject(),
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScript()

        drag.mouseDown();
        drop.mouseMove();
        page = (HtmlPage) drop.mouseUp();
        client.waitForBackgroundJavaScript(1000);

        String log = page.executeJavaScript("$('#log').text()").getJavaScriptResult().toString();
        assertEquals("<div id=\"drop_2\" class=\"drop ui-droppable\"></div>", log);
    }

    public void mockResponse(String path, String contentType) throws Exception {
        URL url = new URL("http://localhost/" + path);
View Full Code Here

Examples of com.vaadin.ui.LegacyWindow.executeJavaScript()

        addComponent(new Button(
                "Window execute Javascript window.open(www.google.com, _blank)",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        win.executeJavaScript("window.open(\"http://www.google.com\", \"_blank\");");
                    }
                }));
        addComponent(new Button(
                "Window execute Javascript window.open(www.google.com, _blank, resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes)",
                new Button.ClickListener() {
View Full Code Here

Examples of com.vaadin.ui.LegacyWindow.executeJavaScript()

        addComponent(new Button(
                "Window execute Javascript window.open(www.google.com, _blank, resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes)",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        win.executeJavaScript("window.open(\"http://www.google.com\", \"_blank\", \"resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes\");");
                    }
                }));

    }
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.