[Webtest] array of values for <setcheckbox>

Louis Zelus webtest@lists.canoo.com
Thu, 29 Jul 2004 18:54:17 -0700


Check boxes with multiple set return data exactly the same way as select
lists do.  So I use the new_setselectfield tag.  However there is a BUG in
the code there.   

This:

List li = Arrays.asList(form.getParameterValues(getName()));
li.add(strValue);
form.setParameter(getName(), (String[]) li.toArray(new String[]{}));

Should be something like this:

ArrayList al = new
ArrayList(Arrays.asList(form.getParameterValues(getName())));
al.add(strValue);
form.setParameter(getName(), (String[]) al.toArray(new String[]{}));


Hope that answers your question.

Louis
-----Original Message-----
From: webtest-admin@gate2.canoo.com [mailto:webtest-admin@gate2.canoo.com]
On Behalf Of Ji Kim
Sent: Thursday, July 29, 2004 3:22 PM
To: webtest@gate2.canoo.com
Subject: [Webtest] array of values for <setcheckbox>

Is there another way to set multiple values for a checkbox field rather
than concat the values and using <invoke>? I believe HttpUnit's
setParameter() accepts a list of values and as long as <setcheckbox> is
still using the method, it seems this should be possible. Just checking
to see if I missed something obvious.

Thanks.

Ji
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest