[Httpunit-develop] Problem with ImageButton
Brought to you by:
russgold
From: Ganesh K. <ga...@cy...> - 2003-01-15 04:42:25
|
Hi Russell, I have a form where the Submit type button is changed to a type "image", after this change I am getting wrong responce. The responceis equal to the responce for the Cancel button on the page. Same code was working fine when the Submit button was there instead of the image. following is the Httpunit code where i am having the problem SubmitButton SButton = loginForm.getSubmitButton("Submit","Submit"); ///create a request for the submit button System.out.println("Submit Buttton Name " + SButton.getName()); System.out.println("Submit Button Value " + SButton.getValue()); request = loginForm.getRequest(SButton); System.out.println("Login form name @@ " + loginForm.getName()); ///Start filling the form request.setParameter( "FirstName", this.param[0] ); request.setParameter( "LastName", this.param[1] ); request.setParameter( "Street", this.param[2] ); request.setParameter( "Apartment", this.param[3] ); request.setParameter( "Town", this.param[4] ); request.setParameter( "City", this.param[5] ); request.setParameter( "Zip", this.param[7] ); ///End Fill out Form ///record the time before sending the request to the server this.SubmitSentTime = System.currentTimeMillis(); ///Send the request to the server response = conversation.getResponse( request ); ///record the time for response from the server this.LoginSuccessTime = System.currentTimeMillis(); WebResponse CurrentPage = conversation.getCurrentPage(); System.out.println("Current Page after User Profile SUbmit " + CurrentPage.getTitle()); ///get the response code from the server ResCode = response.getResponseCode(); System.out.println("Response Code after User Profile SUbmit " + ResCode); |