From: <no...@us...> - 2003-07-23 17:07:58
|
Log Message: ----------- Fixed bug in submit handling Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/xdocs: changes.xml /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html: HtmlSubmitInputTest.java /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html: HtmlInput.java Revision Data ------------- Index: changes.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- changes.xml 19 Jul 2003 18:19:36 -0000 1.117 +++ changes.xml 23 Jul 2003 17:07:55 -0000 1.118 @@ -145,6 +145,10 @@ <action type="new" dev="mbowler" id="742515"> New method HtmlPage.getAllForms() </action> + <action type="update" dev="mbowler"> + Fixed bug where inputs would not submit properly if the type attribute + wasn't lowercase. + </action> </release> </body> Index: HtmlSubmitInputTest.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlSubmitInputTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- HtmlSubmitInputTest.java 10 Jun 2003 11:57:01 -0000 1.5 +++ HtmlSubmitInputTest.java 23 Jul 2003 17:07:55 -0000 1.6 @@ -71,7 +71,7 @@ = "<html><head><title>foo</title></head><body>" + "<form id='form1'>" + "<input type='submit' name='aButton' value='foo'/>" - + "<input type='submit' name='button' value='foo'/>" + + "<input type='suBMit' name='button' value='foo'/>" + "<input type='submit' name='anotherButton' value='foo'/>" + "</form></body></html>"; final WebClient client = new WebClient(); Index: HtmlInput.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html/HtmlInput.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- HtmlInput.java 16 Jun 2003 21:03:24 -0000 1.23 +++ HtmlInput.java 23 Jul 2003 17:07:55 -0000 1.24 @@ -161,7 +161,7 @@ * @throws IOException If an IO error occured */ protected Page doClickAction() throws IOException { - final String type = getTypeAttribute(); + final String type = getTypeAttribute().toLowerCase(); if (type.equals("image") || type.equals("submit")) { return getEnclosingFormOrDie().submit(this); } |