Open mediafactory opened 12 years ago
You can select the form by its index.
form = mechanize.Browser().select_form(nr=0)
nr=0 is the first form, nr=1 would be the second form on the page, etc.
i meant html id
I know what you meant, and yes it would be a nice feature, but for now you can select it by index and name, which should work for all forms.
I saw someone do this with perl mechanize and was sad to see python mechanize didn't have it.
It is actually pretty useful, I find a lot of forms that have an "id" attribute but not name. The index/nr I don't like using since adding other forms to page changes it, so selecting by name or "id" is much better since adding new forms to page wont break it.
Ive added it myself to the code... now to just find out how i can attach a patch file somewheres here... :|
Well the email list looks more active, so ill send it there...
Hi. Is this in the plans somehow? @ddan39 - can you please provide your solution? I need this badly and urgent...
would be nice, too