button.click() not working ,ie HTTPUNIT

B

bhimi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top