Menu

button.click() not working ,ie HTTPUNIT

Help
bhimi2003
2004-09-17
2004-09-17
  • bhimi2003

    bhimi2003 - 2004-09-17

    Hi,
    I am bhimi... I am facing problems with "httpunit", I would like to know how to click the "continue" button in Compose Text Message page of www.mail.yahoo.com. with my destination mobile phone number and text message as setting parameters....(I could set these parameters but could not click the "Continue" button).

    My user id is "batman2004_2004"
    pass- word is "testing"

    1. I am logging into mail.yahoo.com with a java testcase using this Httpunit .
    2.Next i am entering into the "compose text message page",by clicking "compose text msg" button which lies next to INBOX, COMPOSE buttons with my java program...
    3.Next i could enter mobile phone number and text message,but the problem is IT IS NOT CLICKING THE "CONTINUE" BUTTON through my java program...

    please let me know ...

    Thanks in advance,

    Regards,
    Bhimi...
    My code snippet is as follows....
      
       
       WebResponse wr = wc.getResponse( "http://mail.yahoo.com");
     
      
       //get the login form
     
       WebForm form = wr.getFormWithName("login_form");
        
      form.setParameter(".done", "http://mail.yahoo.com");
       form.setParameter("login", "batman2004_2004");
       form.setParameter("passwd", "testing");
       form.submit();
       WebResponse wr1 = wc.getResponse( "http://mail.yahoo.com");
      
           
     
       WebResponse wr2 = wc.getResponse(ymCompose);
       // this is compose SMS page...
        
     
       WebForm form2 = wr2.getFormWithName("Compose");
         
       form2.setParameter("To","00497953453520");
       form2.setParameter("Body", "hi, how r u.");
      
      Button buttons = form4.getButtonWithID("sendtop");
      buttons.click();
                         
      WebResponse wr4 = wc.getCurrentPage();

    I COULD NOT SUCCEED... LATER TRIED THESE STEPS ALSO

    WebForm form2 = wr2.getFormWithName("Compose");
         
       form2.setParameter("To","+4979534535203");
       form2.setParameter("Body", "hi, how r u.");

      SubmitButton submitbutton = form4.getSubmitButton("sendtop");
      submitbutton.click();
     
      or also in this way
     
    SubmitButton submitbutton = form4.getSubmitButton("sendtop");
    form4.submit(submitbutton);
      WebResponse wr4 = wc.getCurrentPage();

    PLEASE HELP ME ..............

    thanks & regards,
    bhimi.

     

     
    • bhimi2003

      bhimi2003 - 2004-09-17

      Hi there,
      It seem's some stranger has changed the password. Anyway you can get that "continue" button in this uk link. "http://login.europe.yahoo.com/config/mail?.intl=uk"

      plz get registered, as someone is going on changing my password which i had kept visible to all, so that u can login directly and save some registration time. But I guess there is a mischief in our forums...

      ur help ll be appreciated...

       

Log in to post a comment.

MongoDB Logo MongoDB