From ssilvert at redhat.com Tue Aug 7 20:41:30 2007 Content-Type: multipart/mixed; boundary="===============3308977408023685603==" MIME-Version: 1.0 From: Stan Silvert To: jsfunit-dev at lists.jboss.org Subject: Re: [jsfunit-dev] ClientFacade.clickLink not working for h:commandLink Date: Tue, 07 Aug 2007 20:41:16 -0400 Message-ID: <46B9112C.8090800@redhat.com> In-Reply-To: 3AA4358A-E3C1-4F2D-BC59-6CB6CE19F8F2@luminis.nl --===============3308977408023685603== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Pieter, The fix is taking a little longer than I expected. If you comment out = two lines of code in WebConversationFactory then the client.clickLink() = on a commandLink will work (at least with MyFaces 1.1). The two lines are: HTMLParserFactory.useJTidyParser(); HttpUnitOptions.setScriptingEnabled(false); The problem is, that will break AJAX support. So I'm not sure what the = final solution will be. Stan Pieter Kuijpers wrote: > I'm trying to test a commandLink in a page with ClientFacade.clickLink, = > but this does not seem to be working. > = > link.jsp: > = > > <%@ taglib uri=3D"http://java.sun.com/jsf/core" prefix=3D"f"%> > <%@ taglib uri=3D"http://java.sun.com/jsf/html" prefix=3D"h"%> > > > > Link test > > > > > > > > > = > target.jsp: > = > > > > Link test successful > > > Success. > > > = > Test code: > = > public class LinkTest extends TestCase { > public void testClickLink() throws Exception { > ClientFacade client =3D new ClientFacade("/link.faces"); > client.clickLink("link"); > assertEquals("Link test successful", = > client.getWebResponse().getTitle()); > } > } > = > The HTML that is returned using client.getWebResponse().getText is that = > of link.jsp. When I try the same test by hand, it is working OK. > = > How is this supposed to work? > = > Thanks, > Pieter Kuijpers. > = > = > = > ------------------------------------------------------------------------ > = > _______________________________________________ > jsfunit-dev mailing list > jsfunit-dev(a)lists.jboss.org > https://lists.jboss.org/mailman/listinfo/jsfunit-dev --===============3308977408023685603==--