2 Replies Latest reply on Jun 13, 2008 4:12 PM by Brian Gregory

    New JSFUnit + Richfaces

    Brian Gregory Newbie

      Ok, I checked out the latest JSFUnit, and the latest HtmlUnit, built them with the specified pom.xml change. So I have one little question - how do I use the Richfaces support?

      The RichFacesClient takes a JSFClientSession of the wrong type. Am I missing something?


        • 1. Re: New JSFUnit + Richfaces
          Stan Silvert Master

          You don't use RichFacesClient any more.

          Start out using the new jsfsession package like this:

          import org.jboss.jsfunit.jsfsession.*;
          JSFSession jsfSession = new JSFSession("/index.jsf");
          JSFClientSession client = jsfSession.getJSFClientSession();
          JSFServerSession server = jsfSession.getJSFServerSession();

          The methods you'll use in JSFClientSession are type(), click(), and setValue(). The javascript for the RichFaces components will be executed just as in your browser.


          • 2. Re: New JSFUnit + Richfaces
            Brian Gregory Newbie

            Wow. That almost seems TOO easy.
            I'm coverting a bunch of tests to the new version - I'll let you know how it goes.