perlcoding has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use WWW::Mechanize; my $url = 'http://host:7777/fagcs_302_C600_sfosun05/domain/'; #my $url = 'http://host:7778/fagcs_320_C106_sfoaix04/domain/'; my $username = 'usrname'; my $password = 'pswd'; my $agent = WWW::Mechanize->new(); $agent->get ($url); #print $agent->content(); if($agent->success()){ eval { $agent->submit_form ( form_number => 0, fields => { 'j_username' => $username, 'j_password' => $password, }, ); }; if ($@) {print "error :($@) "; } print "Couldn't submit form:".$agent->status() .":".":".$agent->conten +t()."\n" unless $agent->success; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mechanize:submit_form issue.
by Herkum (Parson) on Sep 15, 2009 at 17:58 UTC | |
|
Re: Mechanize:submit_form issue.
by Anonymous Monk on Sep 16, 2009 at 10:54 UTC | |
by perlcoding (Initiate) on Sep 16, 2009 at 15:52 UTC | |
by perlcoding (Initiate) on Oct 05, 2009 at 09:18 UTC | |
by Anonymous Monk on Oct 05, 2009 at 09:41 UTC | |
by perlcoding (Initiate) on Oct 05, 2009 at 12:27 UTC | |
|
Re: Mechanize:submit_form issue.
by Sewi (Friar) on Sep 15, 2009 at 19:57 UTC |