Hello all,
I have mechanized a site using LWP and Mechanize that has been working
for about a year, but now no longer does. The site owner has made some
recent changes, but I think mechanize, or more precisely HTML::form
might be having trouble parsing the page and I'd like to find out why.
In order to make the form work, I set the __EVENTTARGET hidden field to
a certain value, but as of this week, the script dies with:
$self->mech->field('__EVENTTARGET',
'ChangeViewControl1$ImpersonateCommand');
No such field '__EVENTTARGET' at
/
usr/lib/perl5/site_perl/5.8.7/WWW/Mechanize.pm line 1247
Sure enough, a form dump no longer shows the __EVENTTARGET field,
however, the 'view source' from firefox shows that there are several
hidden fields created. Notably, the first three that are blank,
__EVENTTARGET, __EVENTARGUMENT, and __LASTFOCUS are all missing from the
form dump. __VIEWSTATE and __EVENTVALIDATION are both fine.
Here is a sample of the page source causing the trouble: