Package electric.xml

Examples of electric.xml.XPath


    {
        WebResponse rs = wc.getResponse(baseUrl + "/inline/page7.jsp");
        Document doc = getDocument(rs);
        assertEquals("{inline7} content 7 jsp", rs.getTitle());
        assertEquals("Page 7 jsp content", doc.getElementWithId("bod").getText("p").toString());
        Elements inlineContents = doc.getElements(new XPath("//[@id='inline-content']"));
        assertEquals("This is a servlet using writer to output", inlineContents.next().getText().toString());
        assertEquals("This is a servlet using stream to output", inlineContents.next().getText().toString());
    }
View Full Code Here


    {
        WebResponse rs = wc.getResponse(baseUrl + "/inline/page7.html");
        Document doc = getDocument(rs);
        assertEquals("{inline7} content 7 static", rs.getTitle());
        assertEquals("Page 7 static content", doc.getElementWithId("bod").getText("p").toString());
        Elements inlineContents = doc.getElements(new XPath("//[@id='inline-content']"));
        assertEquals("This is a servlet using writer to output", inlineContents.next().getText().toString());
        assertEquals("This is a servlet using stream to output", inlineContents.next().getText().toString());
    }
View Full Code Here

TOP

Related Classes of electric.xml.XPath

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.