Menu

#9 HttpUnitDialog submit overload

closed-fixed
None
3
2004-06-10
2003-05-30
No

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.

Discussion

  • Charles Blaxland

    Patch for HttpUnitDialog.java

     
  • Jim Weaver

    Jim Weaver - 2003-09-18
    • priority: 5 --> 3
     
  • Jim Weaver

    Jim Weaver - 2003-09-18

    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

     
  • Jim Weaver

    Jim Weaver - 2003-09-18
    • assigned_to: nobody --> jimweaver
     
  • Martijn Dashorst

    • status: open --> closed-fixed
     
  • Martijn Dashorst

    Logged In: YES
    user_id=695103

    This is fixed in release 1.2.

     

Log in to post a comment.