[Http-webtest-general] button with input TYPE="button"
Brought to you by:
m_ilya,
richardanderson
From: Eral T. <era...@ho...> - 2003-02-14 20:10:31
|
Hi, here is a form with two buttons I am trying to test with HTTP-WebTest v2.00: <form METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" NAME="theForm"> <table align=center width=100% > <tr> <th ALIGN="right">TheForm Header</th> <td><input TYPE="text" NAME="Thingname" VALUE="Good_name" SIZE=12 MAXLENGTH=12></td> </tr> <tr> <td ALIGN="right"><input TYPE="submit" NAME="okay" VALUE="Set Name"></td> <td><input TYPE="button" NAME="cancel" VALUE="Cancel" ONCLICK="document.location='../otherscript.cgi';"></td> </tr> </table> </form> I would like to test the cancel button with click_button after submitting a bad name: plugins = ( "::Click" ) test_name = Cancel bad system name url = mainscript.cgi # Returns the above form click_button = Cancel params = ( Thingname => Bad_name ) text_require = ( Some text returned by otherscript.cgi ) end_test Well, this test always fail because the answer I receive is as if I had clicked on the "Set Name" button. Would there be a way to test the Cancel button? Is there anything I am doing wrong? Thank you in advance, =o= kk1 PS: It took me quite some time to figure out how to specify two plugins in the same script. It seems that plugins( "::Plug1" "::Plug2" ) works, but it would be nice to put it somewhere in the Cookbook. _________________________________________________________________ |