I want to clear this webpage using Mechanize. The form element is as follows:
<form name="ctl00" method="post" action="PSearchResults.aspx?state=ME&rp=" id="ctl00"> <div> <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="verylongstring" /> </div> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKb7POZAwK4v7ffCOmari00yJft/iuZBMdOH/zh9TDI" /> </div> </form>
I use Mechanize to print controls, but it can only see two of them. If I run this:
br.select_form(name='ctl00') br.form.set_all_readonly(False)
all that is printed is the following:
- (name, type, value) = ('__VIEWSTATE', 'hidden', '/wEPDwUGNDQ5NTMwD2QWAgIBD2QWAgIHD2QWCgIBDw8WAh4E...more - (name, type, value) = ('__EVENTVALIDATION', 'hidden', '/wEWAgKb7POZAwK4v7ffCOmari00yJft/iuZBMdOH/zh9TDI')
Why can't the mechanism "see" the __EVENTTARGET and __EVENTARGUMENT fields?
AP257 source share