[twill] testing forms with twill
pzerbinos at gmail.com
Thu Aug 2 11:55:04 PDT 2007
I'm trying to use twill to test a site that has a huge application form on
it. It's not working particularly well, and I believe I've figured out why.
I'm just not sure what to do about it.
Let's say you need to select your state from a drop-down menu. The html
looks like this:
<select id="business_mailing_state" name="business[mailing_state]">
I'm trying to submit the form with no values selected, so I can test the
form errors. However, twill doesn't seem to recognize that first empty
option. If you look at the site in a browser, the drop-down menu is
initially a blank box. In twill, however, it skips the blank box and shows
you the first populated option:
## ## __Name__________________ __Type___ __ID________
1 business[mailing_state] select business ... ['AK'] of ['AK', 'AL',
'AR', 'AZ', ' ...
I can likely talk to the site developer about putting a value on that first
option ("--" or "Please select" or something similar), but I'm curious if
anyone has other ideas about how to get around this problem. I've tried
using fv to explicitly set the empty string, but that throws
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the twill