HttpUnitDialog submit overload
Brought to you by:
henryju
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.
Patch for HttpUnitDialog.java
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
Logged In: YES
user_id=695103
This is fixed in release 1.2.