in reply to The age old JavaScript WWW::Mech scenario
gives me something.$mech->submit_form( form_number => 2, fields =>{ sess => "summer", course => $prefix, }, );
UPDATE:...and that something wasn't good.
I've always found it easier to debug form automation in WWW::Mechanize by doing one thing at a time. This works for me:
use WWW::Mechanize; use HTML::TokeParser; my $mech = WWW::Mechanize->new(cookie_jar => undef); $url="http://www.utsc.utoronto.ca/~registrar/scheduling/timetable"; $prefix = "ANT"; $mech->get($url); $mech->form_number(2); $mech->set_visible( [radio => 'summer'] ); # page default anyway $mech->select( 'course', $prefix ); $mech->click_button( name => 'submit' ); print $mech->content();
- clarified first sentence.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The age old JavaScript WWW::Mech scenario
by trwww (Priest) on Apr 30, 2009 at 00:39 UTC | |
by whakka (Hermit) on Apr 30, 2009 at 01:29 UTC |