Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker


    /**
     * Verify that the Struts Blank app has started
     */
    public void testStrutsBlank() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-blank-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("Struts Blank Application", page.getTitleText());
    }
View Full Code Here


    /**
     * Verify that the Struts Cookbook app has started
     */
    public void testStrutsCookbook() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-cookbook-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("Struts Cookbook", page.getTitleText());
    }
View Full Code Here

    /**
     * Verify that the view source function is working
     * in the Struts Cookbook app.
     */
    public void testStrutsCookbookViewSource() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-cookbook-" + version + "/source.jsp"
                + "?src=/WEB-INF/src/java/examples/SuccessAction.java");
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("View Source", page.getTitleText());
    }
View Full Code Here

   
    /**
     * Verify that the Struts Examples app has started
     */
    public void testStrutsExamples() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-examples-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("Struts Examples", page.getTitleText());
    }
View Full Code Here

    /**
     * Verify that the Struts Faces Example 1 app has started
     */
    public void testStrutsFacesExample1() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-faces-example1-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("MailReader Demonstration Application",
                page.getTitleText());
    }
View Full Code Here

    /**
     * Verify that the Struts Faces Example 2 app has started
     */
    public void testStrutsFacesExample2() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-faces-example2-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("Struts+Tiles+Faces Example Application",
                page.getTitleText());
    }
View Full Code Here

    /**
     * Verify that the Struts Mailreader app has started
     */
    public void testStrutsMailreader() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:"
                + port + "/struts-mailreader-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("MailReader Demonstration Application",
                page.getTitleText());
    }
View Full Code Here

    /**
     * Verify that the Struts Scripting Mailreader app has started
     */
    public void testStrutsScriptingMailreader() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:" + port
                + "/struts-scripting-mailreader-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("MailReader Demonstration Application",
                page.getTitleText());
    }
View Full Code Here

    /**
     * Verify that the Struts EL Exercise Taglib app has started
     */
    public void testStrutsELExcerciseTaglib() throws Exception {
        WebClient webClient = new WebClient();
        URL url = new URL("http://localhost:" + port
                + "/struts-el-example-" + version);
        HtmlPage page = (HtmlPage) webClient.getPage(url);

        assertEquals("Struts-EL Test Application", page.getTitleText());
    }
View Full Code Here

*/
public class HelloworldTestCase {

    @Test
    public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException {
        TextPage page = (TextPage)new WebClient().getPage("http://localhost:8085/helloworld-jaxrs/rest/world");
        assertEquals("Hello World", page.getContent());
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker

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.