简体   繁体   English

如何在python中删除控件-机械化?

[英]How to remove a control in python - mechanize?

Knowing the API to add a new Control is 知道添加新控件的API是

 br.form.new_control('text','ctl00$ContentPlaceHolder1$fooBar',{'value':''})
 br.form.fixup()

How could I remove a Control in python mechanize? 如何在python机械化中删除控件?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM