[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit FormSubmitTest.java,1.20,1.21
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-08-19 18:52:30
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit In directory usw-pr-cvs1:/tmp/cvs-serv7684/test/com/meterware/httpunit Modified Files: FormSubmitTest.java Log Message: Added support for form.submit and Button.onClick Index: FormSubmitTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormSubmitTest.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- FormSubmitTest.java 16 Aug 2002 17:24:01 -0000 1.20 +++ FormSubmitTest.java 19 Aug 2002 18:52:26 -0000 1.21 @@ -158,6 +158,20 @@ } + public void testNonSubmitButtonDetection() throws Exception { + defineWebPage( "Default", "<form method=GET action = \"/ask\">" + + "<Input type=text name=age value=12>" + + "<Input type=submit name=update>" + + "<Input type=reset>" + + "<Input type=button value=recalculate>" + + "</form>" ); + WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" ); + WebForm form = page.getForms()[0]; + Button[] buttons = form.getButtons(); + assertEquals( "num detected buttons", 3, buttons.length ); + } + + public void testDisabledSubmitButtonDetection() throws Exception { defineWebPage( "Default", "<form method=GET action = \"/ask\">" + "<Input type=text name=age value=12>" + |