HtmlPage page = renderView();
assertNotNull(page);
List<?> scripts = page.getDocumentHtmlElement().getHtmlElementsByTagName(HTML.SCRIPT_ELEM);
for (Iterator<?> it = scripts.iterator(); it.hasNext();) {
HtmlScript item = (HtmlScript) it.next();
String srcAttr = item.getSrcAttribute();
if (item.getFirstDomChild() != null) {
String scriptBodyString = item.getFirstDomChild().toString();
if (scriptBodyString.contains("new Calendar")&&scriptBodyString.contains("form:calendar")) {
assertTrue(scriptBodyString.contains("datePattern"));
assertTrue(scriptBodyString.contains("d/MM/yyyy"));
assertTrue(scriptBodyString.contains("currentDate"));