W
walala
Dear all,
I try to use Perl to automating the log-on process to 'mail.yahoo.com'
webpage. Here is my program:
---------------------------------------------------
use Clone;
use WWW::Automate;
my $agent = WWW::Automate->new();
$url='mail.yahoo.com';
$agent->get($url);
#$agent->follow($link);
$agent->form(2);
$agent->field($name, $value);
$agent->click($button);
$agent->back();
$agent->add_header($name => $value);
print "OK" if $agent->{content} =~ /$expected/;
-----------------------------------------------------------
However, it gives error message that "there is no form number 2"...
Can anybody tell me what is the form number of that "login" and "passwd"
field in "mail.yahoo.com"?
And how to find it out?
Thanks a lot,
-Walala
I try to use Perl to automating the log-on process to 'mail.yahoo.com'
webpage. Here is my program:
---------------------------------------------------
use Clone;
use WWW::Automate;
my $agent = WWW::Automate->new();
$url='mail.yahoo.com';
$agent->get($url);
#$agent->follow($link);
$agent->form(2);
$agent->field($name, $value);
$agent->click($button);
$agent->back();
$agent->add_header($name => $value);
print "OK" if $agent->{content} =~ /$expected/;
-----------------------------------------------------------
However, it gives error message that "there is no form number 2"...
Can anybody tell me what is the form number of that "login" and "passwd"
field in "mail.yahoo.com"?
And how to find it out?
Thanks a lot,
-Walala