lpanokarren has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use WWW::Mechanize; use HTML::TokeParser; use HTML::TreeBuilder; my $agent = WWW::Mechanize->new(); $agent->get("http://monitoring.cogenra.com/login"); $agent->form_id('form1'); $agent->field('ctl00$ContentPlaceHolder1$txtUname','******' ); $agent->field('ctl00$ContentPlaceHolder1$txtPwd', '******' ); $agent->click('ctl00$ContentPlaceHolder1$btn_Login'); print "\n" . $agent->success(); print $agent->status() . "\n"; #print $agent->content_type() . "\n"; #print $agent->title() . "\n"; print $agent->uri() . "\n"; $agent->form_id( 'form1' ); my $stream = HTML::TokeParser->new(\$agent->{content}); print "\n" . $agent->uri();
1200 http://monitoring.cogenra.com/login http://monitoring.cogenra.com/login
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW Mechanize FAQ!!!
by Anonymous Monk on Sep 29, 2013 at 06:25 UTC |