I'm not submitting this as a bug yet, as I'm not sure if I just missed a step or something...
My html has a javascript that calls submit when select is changed: <html> <form name="myform" action="http://www.yahoo.com"> <select name="names" onChange="document.myform.submit();"> <option value="All">All</option> <option value="None">None</option> </select> </form> </html> My JWebunit Test follows: public void testHtml() throws Exception { getTestContext().setBaseUrl("http://localhost:8080/myapp"); beginAt("try.html"); dumpResponse(System.out); selectOption("names","None"); dumpResponse(System.out); } Output is wrong: <html> <form name="myform" action="http://www.yahoo.com"> <select name="names" onChange="document.myform.submit();"> <option value="All">All</option> <option value="None">None</option> </select> </form> </html> <html> <form name="myform" action="http://www.yahoo.com"> <select name="names" onChange="document.myform.submit();"> <option value="All">All</option> <option value="None">None</option> </select> </form> </html> JwebUnit Using HttpUnitDialog public void testHtml2() throws Exception { getTestContext().setBaseUrl(MainTest.URL); beginAt("try.html"); dumpResponse(System.out); hud=getDialog(); resp=hud.getResponse(); form=resp.getForms()[0]; form.setParameter("names","None"); resp=getTestContext().getWebClient().getCurrentPage(); System.out.println(resp.getText()); } Output is correct. ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Jwebunit-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
