12 Replies Latest reply on Feb 17, 2010 12:59 PM by ssilvert

    How to test form in rich:page

    jadtn

      Hi

      There is someone who has make some test with rich:page?

      Thanks
      I've this exception :

      Wrapped java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage (http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf#86)
      
      ======= EXCEPTION START ========
      Exception class=[net.sourceforge.htmlunit.corejs.javascript.WrappedException]
      com.gargoylesoftware.htmlunit.ScriptException: Wrapped java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage (http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf#86)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:534)
      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:464)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:992)
      at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:164)
      at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:177)
      at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:574)
      at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:936)
      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:941)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1317)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1288)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1257)
      at org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:226)
      at com.horizon.web.jsf.newuser.CtrlLoginCpSearchTest.testCountryNotSelected(CtrlLoginCpSearchTest.java:31)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
      at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage (http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf#86)
      at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:183)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2019)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:286)
      at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:73)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.get(XMLHttpRequest.java:489)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1616)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1460)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:3021)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:2487)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:492)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:165)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:440)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:375)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
      at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:3330)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:2487)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
      at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:267)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
      at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:82)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:492)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:457)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:528)
      ... 65 more
      Caused by: java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
      at com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:94)
      at com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1889)
      at com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:866)
      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:445)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329)
      at com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:70)
      at com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
      at com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:157)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:146)
      at com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
      at com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:73)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:243)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
      ... 95 more
      WrappedException: net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage (http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf#86)
      at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:183)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2019)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:286)
      at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:73)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.get(XMLHttpRequest.java:489)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1616)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1460)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:3021)
      at script(http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf:86)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:2487)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:492)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:165)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:440)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:375)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
      at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:3330)
      at script(http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf:91)
      at script(http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf:160)
      at script(http://localhost:80/a4j/g/3_3_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf:160)
      at script(onclick event for HtmlButtonInput[<input id="fcpst:b_s" name="fcpst:b_s" onclick="A4J.AJAX.Submit('fcpst',event,{'similarityGroupingId':'fcpst:b_s','parameters':{'fcpst:b_s':'fcpst:b_s'} } );return false;" value="Chercher" type="button">] in http://localhost:80/pages/pub/cpsearchforlogin.jsf)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:2487)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
      at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:267)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
      at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:82)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:492)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:457)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:528)
      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:464)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:992)
      at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:164)
      at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:177)
      at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:574)
      at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:936)
      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:941)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1317)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1288)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1257)
      at org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:226)
      at com.horizon.web.jsf.newuser.CtrlLoginCpSearchTest.testCountryNotSelected(CtrlLoginCpSearchTest.java:31)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
      at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
      at com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:94)
      at com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1889)
      at com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:866)
      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:445)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329)
      at com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:70)
      at com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
      at com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:157)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:146)
      at com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
      at com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:73)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:243)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
      ... 95 more
      Inside wrapped exception:
      java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
      at com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:94)
      at com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1889)
      at com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:866)
      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:445)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329)
      at com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:70)
      at com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
      at com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:157)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:211)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:213)
      at com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:146)
      at com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
      at com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:73)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:243)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2019)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:286)
      at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:73)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.get(XMLHttpRequest.java:489)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1616)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1460)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:3021)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:2487)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:492)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.setState(XMLHttpRequest.java:165)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.doSend(XMLHttpRequest.java:440)
      at com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:375)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
      at net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:3330)
      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:2487)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
      at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:267)
      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
      at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:82)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:492)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:457)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:528)
      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:464)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:992)
      at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:164)
      at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:177)
      at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:574)
      at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:936)
      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)
      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:941)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1317)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1288)
      at com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1257)
      at org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:226)
      at com.horizon.web.jsf.newuser.CtrlLoginCpSearchTest.testCountryNotSelected(CtrlLoginCpSearchTest.java:31)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
      at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      == CALLING JAVASCRIPT ==
      function () {
      [native code, arity=0]
      }
      
      ======= EXCEPTION END ========


        • 1. Re: How to test form in rich:page
          jadtn

          And this in server logs :

          java.lang.IllegalStateException: No script object associated with the Page
           at com.gargoylesoftware.htmlunit.html.DomNode.getScriptObject(DomNode.java:869)
           at com.gargoylesoftware.htmlunit.html.DomNode.getScriptObject(DomNode.java:871)
           at com.gargoylesoftware.htmlunit.html.HtmlElement.getEventHandler(HtmlElement.java:834)
           at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1247)
           at com.gargoylesoftware.htmlunit.html.HtmlPage.cleanUp(HtmlPage.java:218)
           at com.gargoylesoftware.htmlunit.WebWindowImpl.destroyChildren(WebWindowImpl.java:159)
           at com.gargoylesoftware.htmlunit.TopLevelWindow.close(TopLevelWindow.java:106)
           at org.jboss.jsfunit.framework.WebClientSpec.valueUnbound(WebClientSpec.java:308)
           at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1649)
           at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756)
           at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
           at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1111)
           at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
           at org.jboss.jsfunit.framework.JSFUnitServletRedirector.cleanUp(JSFUnitServletRedirector.java:68)
           at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:47)
           at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
           at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
           at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
           at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
           at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
           at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
           at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:619)


          • 2. Re: How to test form in rich:page
            ssilvert

            Maybe you ran into this problem?
            http://lists.canoo.com/pipermail/webtest/2009q4/012685.html
            http://sourceforge.net/tracker/?func=detail&atid=448266&aid=2073464&group_id=47038

            Which version of HtmlUnit are you using? It looks like someone else reported this to the HtmlUnit team and they closed it as "Works for me" with the latest version.

            Stan

            • 3. Re: How to test form in rich:page
              andrewg

              Hi did you ever get this sorted out?

               

              I am having the same problem, BUT Stan provided me with an upgraded version of JSFUnit that uses HtmlUnit 2.6+ and this is still a fail for me

              • 4. Re: How to test form in rich:page
                jadtn

                Hi,

                 

                I always don t test my rich:page. I  have just make a test with html 2.6 and  i ve this as new exception at the end.

                Exception is form my test on client.click("sfcp:fcpst:b_s");

                 

                So I ve already change my FormAuthenticationStrategy.

                 

                 

                Adrien

                 

                 

                package com.horizon.web.jsf.searches;
                import java.io.IOException;
                import java.util.List;

                 

                import org.jboss.jsfunit.framework.SimpleInitialRequestStrategy;
                import org.jboss.jsfunit.framework.WebClientSpec;

                 

                import com.gargoylesoftware.htmlunit.Page;
                import com.gargoylesoftware.htmlunit.html.ClickableElement;
                import com.gargoylesoftware.htmlunit.html.HtmlElement;
                import com.gargoylesoftware.htmlunit.html.HtmlInput;
                import com.gargoylesoftware.htmlunit.html.HtmlPage;
                import com.horizon.web.jsf.fields.FieldsLogin;

                 

                public class LorizonFormAuthenticationStrategy extends SimpleInitialRequestStrategy
                {

                 

                       private String userName;
                       private String password;
                       private String submitComponent;

                 

                       public LorizonFormAuthenticationStrategy(String userName, String password, String submitComponent)
                       {
                          this.userName = userName;
                          this.password = password;
                          this.submitComponent = submitComponent;
                       }
                      
                       /**
                        * Perform the initial request and provide FORM authentication
                        * credentials when challenged.
                        *
                        * @param wcSpec The WebClient specification.
                        *
                        * @return The requested page if authentication passed.  Otherwise, return
                        *         the error page specified in web.xml.
                        */
                       public Page doInitialRequest(WebClientSpec wcSpec) throws IOException
                       {
                          HtmlPage page = (HtmlPage)super.doInitialRequest(wcSpec);
                          setValue(page, FieldsLogin.F_USERNAME, this.userName);
                          setValue(page, FieldsLogin.F_PWD, this.password);
                         return clickSubmitComponent(page);
                          /*HtmlElement htmlElement = getElement(pag, "fm:scp");
                          return htmlElement.click();*/
                       }
                      
                       protected Page clickSubmitComponent(HtmlPage page) throws IOException
                       {
                          HtmlElement htmlElement = getElement(page, this.submitComponent);
                          if (!(htmlElement instanceof ClickableElement))
                          {
                             throw new IllegalStateException("Component with name=" + this.submitComponent + " is not a ClickableElement.");
                          }
                         
                          ClickableElement clickable = (ClickableElement)htmlElement;
                         
                         
                         
                          return clickable.click();
                       }
                      
                       protected void setValue(HtmlPage page, String elementName, String value)
                       {
                          HtmlElement element = getElement(page, elementName);
                          if (!(element instanceof HtmlInput))
                          {
                             throw new IllegalStateException("Component with name=" + elementName + " is not an HtmlInput element.");
                          }
                          HtmlInput inputElement = (HtmlInput)element;
                          inputElement.setValueAttribute(value);
                       }
                      
                       protected HtmlElement getElement(HtmlPage page, String elementName)
                       {   
                          
                          //List<HtmlElement> elements = page.getHtmlElementsByName(elementName);//htmlunit 2.5
                           List<HtmlElement> elements = page.getElementsByName(elementName); //html unit 2.6
                          if (elements.size() == 0)
                          {
                             throw new IllegalStateException("Component with name=" + elementName + " was not found on the login page.");
                          }
                          if (elements.size() > 1)
                          {
                             throw new IllegalStateException("More than one component with name=" + elementName + " was found on the login page.");
                          }
                         
                          return elements.get(0);
                       }}

                 

                 

                 

                 

                 

                 

                 

                testCountryNotSelectedErrorWrapped  java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage  cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage  (http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf#1111)=======  EXCEPTION START ========
                Exception  class=[net.sourceforge.htmlunit.corejs.javascript.WrappedException]
                com.gargoylesoftware.htmlunit.ScriptException:  Wrapped java.lang.ClassCastException:  com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to  com.gargoylesoftware.htmlunit.html.HtmlPage  (http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf#1111)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:526)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456)
                at  com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200)
                at  com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177)
                at  org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:226)
                at  com.horizon.web.jsf.newuser.CtrlLoginCpSearchTest.testCountryNotSelected(CtrlLoginCpSearchTest.java:30)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
                at  org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
                at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
                at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
                at  org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
                at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
                at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
                at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
                at  org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
                at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                at  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
                at  org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
                at  org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
                at  org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at  org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                at  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                at  org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at  org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)
                Caused by:  net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped  java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage  cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage  (http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf#1111)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1789)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:183)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2253)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:318)
                at  com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.get(XMLHttpRequest.java:497)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1853)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1461)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1379)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:170)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:448)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:382)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
                at  net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427)
                at  com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:520)
                ... 65 more
                Caused by: java.lang.ClassCastException:  com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to  com.gargoylesoftware.htmlunit.html.HtmlPage
                at  com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:92)
                at  com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1969)
                at  com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:872)
                at  com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:450)
                at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330)
                at  com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:70)
                at  com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
                at  com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
                at  com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:151)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:205)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at  com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:140)
                at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
                at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:72)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:248)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
                ... 95 more
                WrappedException:  net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped  java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage  cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage  (http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf#1111)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1789)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:183)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2253)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:318)
                at  com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.get(XMLHttpRequest.java:497)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1853)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1461)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1379)
                at  script(http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf:1111)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:170)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:448)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:382)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
                at  net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
                at  script(http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf:1148)
                at  script(http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf:1908)
                at  script(http://localhost:80/a4j/g/3_3_3.BEATA1org.ajax4jsf.javascript.AjaxScript.jsf:1924)
                at script(onclick event for HtmlButtonInput[<input  id="sfcp:fcpst:b_s" name="sfcp:fcpst:b_s"  onclick="A4J.AJAX.Submit(&apos;sfcp:fcpst&apos;,event,{&apos;similarityGroupingId&apos;:&apos;sfcp:fcpst:b_s&apos;,&apos;parameters&apos;:{&apos;sfcp:fcpst:b_s&apos;:&apos;sfcp:fcpst:b_s&apos;}  } );return false;" value="Chercher" type="button">] in  http://localhost:80/pages/pub/cpsearchforlogin.jsf)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427)
                at  com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:520)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456)
                at  com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200)
                at  com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177)
                at  org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:226)
                at  com.horizon.web.jsf.newuser.CtrlLoginCpSearchTest.testCountryNotSelected(CtrlLoginCpSearchTest.java:30)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
                at  org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
                at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
                at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
                at  org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
                at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
                at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
                at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
                at  org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
                at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                at  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
                at  org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
                at  org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
                at  org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at  org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                at  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                at  org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at  org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)
                Caused by:  java.lang.ClassCastException: com.gargoylesoftware.htmlunit.xml.XmlPage  cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage
                at  com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:92)
                at  com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1969)
                at  com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:872)
                at  com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:450)
                at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330)
                at  com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:70)
                at  com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
                at  com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
                at  com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:151)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:205)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at  com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:140)
                at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
                at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:72)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:248)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
                ... 95 more
                Inside wrapped exception:
                java.lang.ClassCastException:  com.gargoylesoftware.htmlunit.xml.XmlPage cannot be cast to  com.gargoylesoftware.htmlunit.html.HtmlPage
                at  com.gargoylesoftware.htmlunit.html.FrameWindow.getEnclosingPage(FrameWindow.java:92)
                at  com.gargoylesoftware.htmlunit.WebClient$CurrentWindowTracker.webWindowContentChanged(WebClient.java:1969)
                at  com.gargoylesoftware.htmlunit.WebClient.fireWindowContentChanged(WebClient.java:872)
                at  com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:450)
                at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330)
                at  com.gargoylesoftware.htmlunit.html.BaseFrame.<init>(BaseFrame.java:70)
                at  com.gargoylesoftware.htmlunit.html.HtmlInlineFrame.<init>(HtmlInlineFrame.java:48)
                at  com.gargoylesoftware.htmlunit.html.DefaultElementFactory.createElementNS(DefaultElementFactory.java:231)
                at  com.gargoylesoftware.htmlunit.xml.XmlUtil.createFrom(XmlUtil.java:151)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:205)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at com.gargoylesoftware.htmlunit.xml.XmlUtil.copy(XmlUtil.java:207)
                at  com.gargoylesoftware.htmlunit.xml.XmlUtil.appendChild(XmlUtil.java:140)
                at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:114)
                at  com.gargoylesoftware.htmlunit.xml.XmlPage.<init>(XmlPage.java:72)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxGet_responseXML(XMLHttpRequest.java:248)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getImpl(ScriptableObject.java:2253)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:318)
                at  com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:74)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.get(XMLHttpRequest.java:497)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:1853)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1461)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1379)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.setState(XMLHttpRequest.java:170)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.doSend(XMLHttpRequest.java:448)
                at  com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequest.jsxFunction_send(XMLHttpRequest.java:382)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:161)
                at  net.sourceforge.htmlunit.corejs.javascript.FunctionObject.call(FunctionObject.java:476)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
                at  net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:427)
                at  com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:263)
                at  net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3058)
                at  net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:80)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:484)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:449)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:520)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
                at  com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:456)
                at  com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:925)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:182)
                at  com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:200)
                at  com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:609)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:886)
                at  net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:529)
                at  net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:536)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:891)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1237)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1208)
                at  com.gargoylesoftware.htmlunit.html.HtmlElement.click(HtmlElement.java:1177)
                at  org.jboss.jsfunit.jsfsession.JSFClientSession.click(JSFClientSession.java:226)
                at  com.horizon.web.jsf.newuser.CtrlLoginCpSearchTest.testCountryNotSelected(CtrlLoginCpSearchTest.java:30)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at  org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
                at  org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
                at  org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
                at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
                at  org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
                at  org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
                at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
                at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
                at  org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
                at  org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
                at  org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                at  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
                at  org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
                at  org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
                at  org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                at  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at  org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                at  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                at  org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                at  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at  org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                at  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)
                == CALLING JAVASCRIPT ==
                function  () {
                [native code, arity=0]
                }

                ======= EXCEPTION END  ========
                • 5. Re: How to test form in rich:page
                  jadtn

                  I've forgot the exception from the sdtout

                  java.lang.IllegalStateException: No script object associated with the Page
                          at com.gargoylesoftware.htmlunit.html.DomNode.getScriptObject(DomNode.java:783)
                          at com.gargoylesoftware.htmlunit.html.DomNode.getScriptObject(DomNode.java:785)
                          at com.gargoylesoftware.htmlunit.html.HtmlElement.getEventHandler(HtmlElement.java:784)
                          at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1149)
                          at com.gargoylesoftware.htmlunit.html.HtmlPage.cleanUp(HtmlPage.java:219)
                          at com.gargoylesoftware.htmlunit.WebWindowImpl.destroyChildren(WebWindowImpl.java:164)
                          at com.gargoylesoftware.htmlunit.TopLevelWindow.close(TopLevelWindow.java:116)
                          at org.jboss.jsfunit.framework.WebClientSpec.valueUnbound(WebClientSpec.java:308)
                          at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1649)
                          at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756)
                          at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
                          at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1111)
                          at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
                          at org.jboss.jsfunit.framework.JSFUnitServletRedirector.cleanUp(JSFUnitServletRedirector.java:68)
                          at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:47)
                          at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
                          at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
                          at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
                          at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
                          at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
                          at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
                          at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                          at java.lang.Thread.run(Thread.java:619)

                  • 6. Re: How to test form in rich:page
                    ssilvert

                    I haven't seen this problem before except in the forum link I posted earlier.  Can you attach a simple example that recreates the problem?

                     

                    Stan

                    • 7. Re: How to test form in rich:page
                      jadtn

                      Stan,

                      I ve put in the rar in attachFiles a sample of the problem.

                      Actually I suspect the presence of rich:scrollableDataTable

                      I m in richface 3.3.3 Beta 1

                      Adrien

                      • 8. Re: How to test form in rich:page
                        ssilvert

                        Thanks Adrian.  I have a simple test for ScrollableDataTable in my test suite and it is passing.  I'll try your code and see what happens.

                         

                        Stan

                        • 9. Re: How to test form in rich:page
                          ssilvert

                          Adrian,

                           

                          The file com.horizon.web.jsf.newuser.FieldsConstraints.java is missing.  Please attach.

                           

                          Stan

                          • 10. Re: How to test form in rich:page
                            jadtn

                            Stan

                            I've added all files in the rar.

                             

                            Normaly you they aren't used for the test. It is because I have copied test form exsting file from my project. You can remove the extends It is not used in the test.

                            Adrien

                            • 11. Re: How to test form in rich:page
                              ssilvert

                              I recreated the problem.  It looks like an HtmlUnit bug.  I repackaged your code into a plain HtmlUnit test and reported the bug to them:

                              https://sourceforge.net/tracker/?func=detail&aid=2952333&group_id=47038&atid=448266

                               

                              Stan

                              • 12. Re: How to test form in rich:page
                                ssilvert

                                stan.silvert@jboss.com wrote:

                                 

                                I recreated the problem.  It looks like an HtmlUnit bug.  I repackaged your code into a plain HtmlUnit test and reported the bug to them:

                                https://sourceforge.net/tracker/?func=detail&aid=2952333&group_id=47038&atid=448266

                                 

                                Stan

                                This is now fixed in HtmlUnit SVN.  I don't think they post nightly snapshots so you'll have to build HtmlUnit yourself if you want to try it out.

                                 

                                Stan