Listers,
I am new to WWW::Mechanize, and have gotten it to mechanize alot of
point and click stuff, so it's really great. But I cam across a page
that refuses to yeild. I hope someone can help.
I hit a page on the FDIC website that allows me to download Bank
Performance Reports, so-called "Call Reports." I can fill in the fields
on the page, but the button that kicks off the file transfer is
generated by an HTML tag like this:
<input type="button" value="Export" onclick="FormSubmit(this.form);">
I have tried to click it three ways, by specifying the value, the
number, and by just invoking $mech->submit() after selecting into the
form. None of these worked:
1. $mech->click_button(value => 'Export') yeilds "Can't call method
'header' on undefined value." error.
2. $mech->click_button(number => 1) yeilds "Can't call method 'click' on
undefined value." error.
3. $mech->submit() yeilds no error, but no content either.
I poked around in the code, and it looks like HTML::Form is parsing the
<input type="button" ...> tag as a type HTML::Form::IgnoreInput, which
it does very effectively. Apparently, it only counts a <input
type="submit" ...> tag as a button.
Is this right? I'm no HTML expert, but my 1998 O'Reilly book on HTML,
covering HTML 4.0 states that <input type="button" ...> is a synonym for
<button ...>. I would think that HTML::Forms would allow 'click' on the
two variants of button, not just <input type="submit" ...>.
Am I missing something?
My version of HTML::Forms has a version number of 1.44.
I would greatly appreciate any guru-tude you can throw my way.
Thanks.
--
Daniel E. Doherty <ded@xxxxxxxxxxxxxxxxxxxx>
|