1 Reply Latest reply: Sep 6, 2010 1:27 AM by 791266 RSS

    HttpUnit form submit

      Hi i'm leo. I'm using HttpUnit 1.7 and I'm trying to make a test with the page http://lrrt12.elbruto.es/login and my problem is that i can't submit the form to login into my account here is my code:

      public void pagina1() throws Exception{
                WebConversation wc = new WebConversation();
           WebResponse pag1 = wc.getResponse( "http://lrrt12.elbruto.es/login" );
           WebForm form = pag1.getForms()[0];
           form.setAttribute("pass", "************");
           WebResponse pag2 = wc.getCurrentPage();

      but i can't login!!! what can i do? is there another way to submit a form? i've tried whit form.submit() but it doesn't work =S can you help me?
        • 1. This Thread is now moved
          Note: This thread was originally posted in the [Monitoring, Management, Debugging, and Profiling APIs|http://forums.sun.com/forum.jspa?forumID=539] forum, but moved to this forum for closer topic alignment.