Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.StringWebResponse


        final HtmlSubmitInput submit = (HtmlSubmitInput) form.getElementsByAttribute("input", "type", "submit").get(0);
        return submit.click();
    }

    private String getDecodedAuthnRequest(String content) throws Exception {
        StringWebResponse response = new StringWebResponse(content, new URL("http://localhost:8080/"));
        WebClient webClient = new WebClient();
        HtmlPage page = HTMLParser.parseHtml(response, webClient.getCurrentWindow());
        HtmlForm form = page.getForms().get(0);
        HtmlInput samlRequest = form.getInputByName("SAMLRequest");
        return new String(Base64.decodeBase64(samlRequest.getValueAttribute()));
View Full Code Here


            LOG.warn("close() called when document is not open.");
        }
        else {
            final HtmlPage page = getHtmlPage();
            final URL url = page.getWebResponse().getRequestSettings().getUrl();
            final WebResponse webResponse = new StringWebResponse(writeBuffer_.toString(), url);
            final WebClient webClient = page.getWebClient();
            final WebWindow window = page.getEnclosingWindow();

            webClient.loadWebResponseInto(webResponse, window);
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.StringWebResponse

Copyright © 2018 www.massapicom. 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.