Reputation: 80
Knowing the API to add a new Control is
br.form.new_control('text','ctl00$ContentPlaceHolder1$fooBar',{'value':''})
br.form.fixup()
How could I remove a Control in python mechanize?
Upvotes: 2
Views: 566
Reputation: 53535
ctrl = br.form.find_control('ctl00$ContentPlaceHolder1$fooBar')
ctrl.disabled = True
Upvotes: 4