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

    New JSFUnit + Richfaces

      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?

      Brian

        • 1. Re: New JSFUnit + Richfaces
          ssilvert

          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.

          Stan

          • 2. Re: New JSFUnit + Richfaces

            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.

            Brian