Arthur
Arthur

Reputation: 80

How to remove a control in python - mechanize?

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

Answers (1)

Nir Alfasi
Nir Alfasi

Reputation: 53535

ctrl = br.form.find_control('ctl00$ContentPlaceHolder1$fooBar')
ctrl.disabled = True

Upvotes: 4

Related Questions