1 Reply Latest reply on Aug 21, 2007 12:00 PM by ssilvert

    ServletTestCase : problem navigation

    mblondel

      I would like to test a page but before I have to login.

      ClientFacade client = new ClientFacade("/Authenticate.jsf");
      WebForm loginform = client.getWebResponse().getFormWithID("authenticateForm");
      loginform.setParameter("authenticateForm:login", "exaprotect");
      loginform.setParameter("authenticateForm:password", "exaprotect");
      loginform.getSubmitButton("authenticateForm:_idJsp15").click();
      


      After the authentication, I would like to go the the page wizard.jsf.
      I can't change the page of the ClientFacade otherwise I lost my authentication.

      I can get back the webResponse (WebResponse resp = client.getWebResponse()) but I can't navigate into my application.

      Thanks for your help



        • 1. Re: ServletTestCase : problem navigation
          ssilvert

          There is a security example in subversion that shows how to do this. However, I think I'm going to go ahead and make the proposed changes to ClientFacade. So for security, you will get a WebConversation from the WebConversationFactory, then set the credentials and pass that into the constructor of the ClientFacade. From there you can continue with a user session.

          It shouldn't take more than a day or two to finish the changes. I'll post when it is done and I'll update the example.

          Stan Silvert
          http://www.jsfunit.org