Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.asText()


        page = getPage("/faces/renderkit04.jsp");
        form = getFormById(page, "form");
        assertNotNull("form exists", form);
        hidden = (HtmlHiddenInput)form.getInputByName("javax.faces.RenderKitId");
        assertNotNull("hidden exists", hidden);
        assertTrue(-1 != page.asText().indexOf("HTML_BASIC"));
        assertTrue(-1 != page.asText().indexOf("com.sun.faces.renderkit.html_basic.HtmlResponseWriter"));
        page = getPage("/faces/renderkit-default-clear.jsp");
    }
}
View Full Code Here


        form = getFormById(page, "form");
        assertNotNull("form exists", form);
        hidden = (HtmlHiddenInput)form.getInputByName("javax.faces.RenderKitId");
        assertNotNull("hidden exists", hidden);
        assertTrue(-1 != page.asText().indexOf("HTML_BASIC"));
        assertTrue(-1 != page.asText().indexOf("com.sun.faces.renderkit.html_basic.HtmlResponseWriter"));
        page = getPage("/faces/renderkit-default-clear.jsp");
    }
}
View Full Code Here

  list = getAllElementsOfGivenClass(page, null,
            HtmlSubmitInput.class);
  HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was validated"));
  assertTrue(-1 != page.asText().indexOf("text2 was validated"));
  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
View Full Code Here

  list = getAllElementsOfGivenClass(page, null,
            HtmlSubmitInput.class);
  HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was validated"));
  assertTrue(-1 != page.asText().indexOf("text2 was validated"));
  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '5'"));
View Full Code Here

            HtmlSubmitInput.class);
  HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was validated"));
  assertTrue(-1 != page.asText().indexOf("text2 was validated"));
  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '5'"));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '4'"));
View Full Code Here

  HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was validated"));
  assertTrue(-1 != page.asText().indexOf("text2 was validated"));
  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '5'"));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '4'"));
View Full Code Here

  assertTrue(-1 != page.asText().indexOf("text1 was validated"));
  assertTrue(-1 != page.asText().indexOf("text2 was validated"));
  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '5'"));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '4'"));

    }
View Full Code Here

  assertTrue(-1 != page.asText().indexOf("text2 was validated"));
  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '5'"));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '4'"));

    }

    public void testValidatorMessages() throws Exception {
View Full Code Here

  assertTrue(-1 != page.asText().indexOf("text3 was validated"));
  assertTrue(-1 != page.asText().indexOf("text4 was validated"));
        String str = "allowable maximum of "+'"'+"2"+'"';
  assertTrue(-1 != page.asText().indexOf(str));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '5'"));
  assertTrue(-1 != page.asText().indexOf("allowable maximum of '4'"));

    }

    public void testValidatorMessages() throws Exception {
        HtmlPage page = getPage("/faces/validator03.jsp");
View Full Code Here

                                                                                        
        list = getAllElementsOfGivenClass(page, null,
                                          HtmlSubmitInput.class);
        HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
        page = (HtmlPage) button.click();     
        assertTrue(-1 != page.asText().indexOf("j_idj_id17:dr1: Validation Error: Specified attribute is not between the expected values of 2 and 5."));
        assertTrue(-1 != page.asText().indexOf("DoubleRange2: Validation Error: Specified attribute is not between the expected values of 2 and 5."));
        assertTrue(-1 != page.asText().indexOf("j_idj_id17:l1: Validation Error: Value is less than allowable minimum of '2'"));
        assertTrue(-1 != page.asText().indexOf("Length2: Validation Error: Value is less than allowable minimum of '2'"));
        assertTrue(-1 != page.asText().indexOf("j_idj_id17:lr1: Validation Error: Specified attribute is not between the expected values of 2 and 5."));
        assertTrue(-1 != page.asText().indexOf("LongRange2: Validation Error: Specified attribute is not between the expected values of 2 and 5."));
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.