Package net.sourceforge.jwebunit.junit

Examples of net.sourceforge.jwebunit.junit.WebTester.submit()


        try
        {
            wc.setScriptingEnabled(false);
            wc.beginAt(_baseUrl + "/login");
            wc.setTextField("openid_identifier", _baseUrl + "/user");
            wc.submit();
            wc.clickLink("login");
            wc.assertTextPresent("success");
            wc.assertTextPresent("emailFromFetch:user@example.com");
            wc.assertTextPresent("emailFromSReg:user@example.com");
        }
View Full Code Here


        try
        {
            wc.setScriptingEnabled(false);
            wc.beginAt(_baseUrl + "/login");
            wc.setTextField("openid_identifier", _baseUrl + "/user?format=html");
            wc.submit();
            wc.clickLink("login");
            wc.assertTextPresent("success");
            wc.assertTextPresent("emailFromFetch:user@example.com");
            wc.assertTextPresent("emailFromSReg:user@example.com");
        }
View Full Code Here

        tester2.getTestContext().setBaseUrl(getBaseUrl());
        tester2.beginAt("secure/index.html");
        tester2.setTextField("j_username", "jimi");
        tester2.setTextField("j_password", "jimispassword");
        tester2.setIgnoreFailingStatusCodes(true);
        tester2.submit();
        Assert.assertTrue(tester2.getServerResponse().contains("Maximum sessions of 1 for this principal exceeded"));
    }

    @Test
    public void logoutClearsSessionRegistryAndAllowsSecondLogin() throws Exception {
View Full Code Here

        tester2.getTestContext().setBaseUrl(getBaseUrl());
        tester2.beginAt("secure/index.html");
        tester2.setTextField("j_username", "bessie");
        tester2.setTextField("j_password", "bessiespassword");
        tester2.setIgnoreFailingStatusCodes(true);
        tester2.submit();
        Assert.assertTrue(tester2.getServerResponse().contains("A secure page"));
    }
}
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.