Subject: | update_html doesn't update everything |
Date: | Mon, 13 Aug 2007 14:00:38 -0700 |
To: | bug-WWW-Mechanize [...] rt.cpan.org |
From: | P Fudd <kernel [...] foster.nce.ubc.ca> |
Hi..
I'm using WWW::Mechanize to take a web page, fill in a form, and submit
it.
First problem: the page uses javascript to populate a select field.
Selecting something that should be there gives an unexpected 'illegal
value' error (a select box).
So, I get the page data with $mech->content, rewrite it, and reparse it
with $mech->update_html. This adds 600 options to two of the select
boxes on the page, just like the javascript does in a browser.
Second problem: $mech->value still gives 'illegal value' error, as before.
Using $mech->param instead of $mech->value solves this problem;
$mech->param uses the updated html.
Third problem: Errors with $mech->param refer to lines in the HTML::Form
module, not lines in my program.
Not much of a problem, but should be fixed. $mech->value does the right
thing and refers to my program.
This is from WWW::Mechanize 1.20; I'll try it again with the latest
version later if I can install it on ActiveState perl.
Thanks for writing such a useful module, I use WWW::Mechanize every day now!