RE: [Httpunit-develop] Trouble with submit button.
Brought to you by:
russgold
From: Alex <a.b...@xs...> - 2003-08-20 18:25:18
|
Well looking at your example code below, the Button2 is not a submit button, The type is 'button' not 'submit'. That is probably why you are getting null. > -----Original Message----- > From: htt...@li... > [mailto:htt...@li...] On > Behalf Of Archana Bharathidasan > Sent: Wednesday, August 20, 2003 1:10 PM > To: htt...@li... > Subject: [Httpunit-develop] Trouble with submit button. > > > Hi, > > This is the code I use to get a web-page as a result > of clicking a button: > > (defined: WebForm form, WebResponse response, > WebRequest request) > > form=response.getForms()[0]; > SubmitButton button=form.getSubmitButton("Button2"); > request = form.getRequest(button); > response=conversation.getResponse(request); > > However, I am unable to get the correct result as > Button2 is not being found in the form (value of > button is returned as null) and hence it is not > clicked. > > The corresponding html is: > > <form > > > </p> > <p class="body"> Created. </p> > <table width="95%" border="0" cellspacing="0" > cellpadding="0" align="center"> > <tr> > <td valign="top"> > <div align="center"> > <input type="button" name="Button2" > value="Continue" class="navbutton" > onClick="nextpage1()"> > > <img src="../images/rightarrow.gif" > width="12" height="21" align="top"> > </div> > </td> > </tr> > </table> > <p class="body"> </p> > > </form> > > Why is the button not being recognized? Any help will > be appreciated! > > Thanks, > Archana > > ===== > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~~~ > It is better to be hated for what you are than to be loved > for what you are not. > > -Andre Gide > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design > software http://sitebuilder.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by Dice.com. > Did you know that Dice has over 25,000 tech jobs available > today? From careers in IT to Engineering to Tech Sales, Dice > has tech jobs from the best hiring companies. > http://www.dice.com/index.epl?rel_code=104 > > _______________________________________________ > Httpunit-develop mailing list Htt...@li... > https://lists.sourceforge.net/lists/listinfo/httpunit-develop > |