Package com.gargoylesoftware.htmlunit.xml

Examples of com.gargoylesoftware.htmlunit.xml.XmlPage


            final Object doctype) {
        final XMLDocument document = new XMLDocument(getWindow().getWebWindow());
        document.setParentScope(getParentScope());
        document.setPrototype(getPrototype(document.getClass()));
        if (qualifiedName != null && qualifiedName.length() != 0) {
            final XmlPage page = document.getDomNodeOrDie();
            page.appendChild(page.createXmlElementNS(namespaceURI, qualifiedName));
        }
        return document;
    }
View Full Code Here


            node = transformedDoc.getFirstChild();
        }
        else {
            node = null;
        }
        final XmlPage page = new XmlPage(node, getWindow().getWebWindow());
        doc.setDomNode(page);
        return doc;
    }
View Full Code Here

    }

    private void checkXmlOutput(final String query, final HtmlForm form,
        boolean onlyClusters) throws IOException, Exception
    {
        final XmlPage dcsResponse = (XmlPage) clickSubmit(form);
        final String responseXml = dcsResponse.asXml();

        final ProcessingResult dcsResult = ProcessingResult
            .deserialize(new ByteArrayInputStream(responseXml.getBytes(UTF_8)));
        assertThat(dcsResult.getAttributes().get(AttributeNames.QUERY)).isEqualTo(query);
        if (onlyClusters)
View Full Code Here

    {
        URL url = new URL(baseURL, pageURL);
        Page page = webClient.getPage(url);
        this.response = page.getWebResponse();
        assertTrue("Response should be an XML page", page instanceof XmlPage);
        XmlPage xmlPage = (XmlPage)page;
        this.document = xmlPage.getXmlDocument();
        assertNotNull("Response contains invalid XML", this.document);
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.xml.XmlPage

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.