[twill] problems with form filling works in 0.8.3 but not in 0.8.4a10

Stephen Thorne stephen at netboxblue.com
Wed Mar 22 18:59:02 PST 2006

Norman Khine wrote:
> Titus Brown wrote:
>>p.s. sorry 'bout that... <sigh> Stephen added in a unit test to catch
>>exactly this problem, too!
> ClientForm.AmbiguityError: id=None name=None label=None


I'm looking at this problem too, and what I've come up with is that

commands.formvalue(formnum, fieldname, value) is insufficent for the 
task of selecting, and deselecting, checkboxes.

The issue lays in that the action needs the following data:
What Form?
What Checkbox Name?
What Checkbox Value?
On or Off?

The API as it stands will select or deselect a single, or, if we let

commands.formvalue(formnum, fieldname, 'foo')

work, will allow selection, but not de-selection, of checkboxes.

Going back to the hackish API that PBP used to use, we could allow:

commands.formvalue(formnum, fieldname, '+foo')
commands.formvalue(formnum, fieldname, '-foo')

as well.

Please see attached patch and tests.

Stephen Thorne
Development Engineer

Scanned by the NetBox from NetBox Blue

-------------- next part --------------
A non-text attachment was scrubbed...
Name: handle-multiple.patch
Type: text/x-patch
Size: 6317 bytes
Desc: not available
Url : http://lists.idyll.org/pipermail/twill/attachments/20060322/ac9b52c6/handle-multiple.bin

More information about the twill mailing list