Share

JWebUnit

Tracker: Patches

3 HttpUnitDialog submit overload - ID: 745868
Last Update: Comment added ( dashorst )

While testing a page with multiple submit buttons I
found the need for an additional submit method in
HttpUnitDialog: public void submit(SubmitButton button)

This allows you to submit the page using any arbitrary
SubmitButton. The submit(String buttonName) method
was not sufficient as all the buttons had the same name.


Charles Blaxland ( charlesblaxland ) - 2003-05-30 02:21

3

Closed

Fixed

Jim Weaver

None

None

Public


Comments ( 2 )

Date: 2004-06-10 20:38
Sender: dashorstSourceForge.net Subscriber

Logged In: YES
user_id=695103

This is fixed in release 1.2.


Date: 2003-09-18 22:15
Sender: jimweaver

Logged In: YES
user_id=619947

Hey Charles,

Thanks for the submission, and apologize for the much
delayed response. A question: If you had multiple submit
buttons with the same name, how do you get hold of the
correct SubmitButton in your test to pass to your new
method? I assume you look at the value (label). I also
assume this is how your application reacts differently based
on button pressed. If this is the case, I think accessing
the submit buttons by label is a better solution
(submitFormByLabel(label)). We have that posted as a patch
as well. What do you think?

Jim


Attached File ( 1 )

Filename Description Download
HttpUnitDialog.java.patch Patch for HttpUnitDialog.java Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2004-06-10 20:38 dashorst
resolution_id None 2004-06-10 20:38 dashorst
close_date - 2004-06-10 20:38 dashorst
assigned_to nobody 2003-09-18 22:15 jimweaver
priority 5 2003-09-18 22:15 jimweaver
File Added 51684: HttpUnitDialog.java.patch 2003-05-30 02:21 charlesblaxland