[twill] Form field values?

titus@caltech.edu titus at caltech.edu
Tue Feb 7 15:51:42 PST 2006

On Tue, Feb 07, 2006 at 03:43:36PM -0800, Brett Carter wrote:
-> Is there any way to grab values from named form fields using twill other
-> than using 'find'?  Like I just want to grab the value of the hidden
-> field named 'selected_key' and store it in a variable.
-> -Brett

Hi, Brett,

I don't have any specific API for it, no.  If you're willing to use
Python directly, then something along the lines of

	b = twill.get_browser()
	form = twill.get_form(formname)
	field = browser.get_form_field(form, fieldname)
	value = field.value

should work.


More information about the twill mailing list