Package net.sf.jsptest.html

Examples of net.sf.jsptest.html.Form


        this.forms = new ArrayList();
        NodeList elements = document.getElementsByTagName("FORM");
        for (int i = 0; i < elements.getLength(); i++) {
            Element element = (Element) elements.item(i);
            if (chooser.accept(element)) {
                forms.add(new Form(element));
            }
        }
        if (forms.isEmpty()) {
            Assert.fail("Form not found.");
        }
View Full Code Here


     * @param name
     *            The name of the expected form field.
     */
    public void shouldHaveField(String name) {
        for (Iterator i = forms.iterator(); i.hasNext();) {
            Form form = (Form) i.next();
            if (form.hasInputField(name)) {
                return;
            }
        }
        Assert.fail("No form field '" + name + "' on page");
    }
View Full Code Here

     * @param nameOrLabel
     *            The name or label of the expected submit button.
     */
    public void shouldHaveSubmitButton(String nameOrLabel) {
        for (Iterator i = forms.iterator(); i.hasNext();) {
            Form form = (Form) i.next();
            if (form.hasSubmitButton(nameOrLabel)) {
                return;
            }
        }
        Assert.fail("No form submit button '" + nameOrLabel + "' on page");
    }
View Full Code Here

    /**
     * Assert that the form has a submit button.
     */
    public void shouldHaveSubmitButton() {
        for (Iterator i = forms.iterator(); i.hasNext();) {
            Form form = (Form) i.next();
            if (form.hasSubmitButton()) {
                return;
            }
        }
        Assert.fail("No form submit button on page");
    }
View Full Code Here

     */
    public FormFieldAssertion(List forms, String fieldName) {
        this.fieldName = fieldName;
        this.fields = new ArrayList();
        for (Iterator i = forms.iterator(); i.hasNext();) {
            Form form = (Form) i.next();
            if (form.hasInputField(fieldName)) {
                fields.add(form.getInputField(fieldName));
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.jsptest.html.Form

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.