Package com.gargoylesoftware.htmlunit.html

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


       
        // press the button to increment the property
        buttons = getAllElementsOfGivenClass(page, new ArrayList(),
                HtmlSubmitInput.class);
        page = (HtmlPage) ((HtmlSubmitInput)buttons.get(2)).click();
        assertTrue(-1 != page.asText().indexOf("1"));

    }


}
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 converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text1 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to String"));
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 converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text1 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to Object"));
View Full Code Here

            HtmlSubmitInput.class);
  HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text1 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to String"));
View Full Code Here

  HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text1 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text5: '99' could not be understood as a time. Example:"));
View Full Code Here

  page = (HtmlPage) button.click();
  assertTrue(-1 != page.asText().indexOf("text1 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text1 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text5: '99' could not be understood as a time. Example:"));
  assertTrue(-1 != page.asText().indexOf("4.0"));
View Full Code Here

        String text = null;
        HtmlPage page = getPage("/faces/managed08.jsp");
        HtmlSubmitInput button = (HtmlSubmitInput)
            page.getHtmlElementById("form:clearStatusMessage");
        page = (HtmlPage) button.click();
        text = page.asText();
        Pattern pattern = null;
        assertTrue(-1 != text.indexOf("requestBean PostConstruct: true"));
        assertTrue(-1 != text.indexOf("requestBean PreDestroy: false"));
        assertTrue(-1 != text.indexOf("sessionBean PostConstruct: true"));
        assertTrue(-1 != text.indexOf("sessionBean PreDestroy: false"));
View Full Code Here

                text));
       
        button = (HtmlSubmitInput)
            page.getHtmlElementById("form:reload");
        page = (HtmlPage) button.click();
        text = page.asText();
        assertTrue(Pattern.matches("(?s).*-----------------.*bean: requestBean postConstructCalled: true.*bean: requestBean preDestroyCalled: true.*-----------------.*bean: requestBean postConstructCalled: true.*",
                text));
       

        button = (HtmlSubmitInput)
View Full Code Here

  assertTrue(-1 != page.asText().indexOf("text1 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text1 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text2 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text3 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to Object"));
  assertTrue(-1 != page.asText().indexOf("text4 was converted to String"));
  assertTrue(-1 != page.asText().indexOf("text5: '99' could not be understood as a time. Example:"));
  assertTrue(-1 != page.asText().indexOf("4.0"));
  assertTrue(-1 != page.asText().indexOf("12.0"));
View Full Code Here

            page.getHtmlElementById("form:clearStatusMessage");
        page = (HtmlPage) button.click();
        button = (HtmlSubmitInput)
            page.getHtmlElementById("form:removeSessionBean");
        page = (HtmlPage) button.click();
        text = page.asText();
        assertTrue(Pattern.matches("(?s).*-----------------.*bean: requestBean postConstructCalled: true.*bean: requestBean preDestroyCalled: true.*bean: sessionBean preDestroyCalled: true.*-----------------.*bean: requestBean postConstructCalled: true.*bean: sessionBean postConstructCalled: true.*",
                text));

        button = (HtmlSubmitInput)
            page.getHtmlElementById("form:clearStatusMessage");
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.