Package org.apache.click.pages

Examples of org.apache.click.pages.FormPage


            // Set the field parameter
            container.setParameter("myfield", "one");

            // Process page
            FormPage formPage = (FormPage) container.testPage(FormPage.class);

            System.out.println("\nFirst run finished");
            System.out.println(
                "======================== HTML Document ========================\n"
                + container.getHtml()
                + "\n===============================================================\n");

            // Assert that form with id="form" was rendered
            Assert.assertTrue(container.getHtml().indexOf("id=\"form\"") > 0);

            // Assert that form field "myfield" was bound to request parameter "myfield"
            Assert.assertEquals("one", formPage.getForm().getFieldValue("myfield"));

        } catch (Exception exception) {
            exception.printStackTrace(System.err);
            Assert.fail();
        }
View Full Code Here


            // Set the field parameter
            container.setParameter(fieldName, fieldValue);

            // Process page
            FormPage formPage = (FormPage) container.testPage(FormPage.class);

            // Assert that form with id="form" was rendered
            assertTrue(container.getHtml().indexOf("id=\"form\"") > 0);

            // Assert that form field "myfield" was bound to request parameter "myfield"
            Assert.assertEquals(fieldValue, formPage.getForm().getFieldValue(fieldName));

        } catch (Exception exception) {
            exception.printStackTrace(System.err);
            Assert.fail();
        }
View Full Code Here

TOP

Related Classes of org.apache.click.pages.FormPage

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.