[Webtest] Using setcheckbox
Dierk Koenig
webtest@lists.canoo.com
Tue, 26 Nov 2002 09:41:56 +0100
Hi Richard,
thanx for the bug report.
> 1. One cannot use a dynamic property for the value.
>
> For example: I have a web app which dynamically generates ID's for
> elements of the system. I can select several of these using
> checkboxes within a table. I know the checkbox (with its assocated
> ID) is in the td cell immediately following the td cell containing
> the element name. I can use a (rather ugly) regexp to get the ID
> from the checkbox HTML, but I can't then use this dynamic property
> to set the checkbox to 'checked'.
Do you get no value at all, 'on' or '#{mypropertyname}' ?
Tipp on ugly Regex: they are easier to read when composed from
ant properties like ${StartCell}bla${EndCell}.
Storing dynamic properties from an XPath expression is under way...
> 2. One cannot set additional checkboxes if some are already set.
>
> For example: Some elements are already selected when I arrive on the
> page with the form, and I want to select additional elements. Every
> time I submit the form, only the values I explicitly set on that
> visit to the form are remembered.
Does this concern only checkboxes of the same "name" or all checkboxes?
> 3. One cannot explicitly uncheck previously selected boxes.
>
> For example: Same as above, but I want to deselect checkboxes.
> Using 'setcheckbox' with value="xxx" checked="false" deselects
> everything.
This seems to be a second symptom of the same root cause.
> Are these real problems, or am I missing something obvious? Have any of
> these been fixed in more recent builds (I looked and couldn't find any
> suggestion they have been)?
Nothing like this was addressed in the recent builds.
Property expansion failure for setcheckbox would definitely be a bug.
I just checked and recognized that the automatic test for this
is missing. - Hm - How could this possibly happen?
Looks like duplication to me...
For the checkbox behaviour I'm not sure whether this is a HttpUnit
issue. It would help to have a look at your html.
cheers
Mittie