Main > Programming > Libraries >

WWW::Mechanize 1.18

WWW::Mechanize 1.18

Sponsored Links

WWW::Mechanize 1.18 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.10 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1227
Date added: 2006-06-15
Publisher: Andy Lester

WWW::Mechanize 1.18 description

WWW::Mechanize is a handy web browsing in a Perl object.

SYNOPSIS

WWW::Mechanize, or Mech for short, helps you automate interaction with a website. It supports performing a sequence of page fetches including following links and submitting forms. Each fetched page is parsed and its links and forms are extracted. A link or a form can be selected, form fields can be filled and the next page can be fetched. Mech also stores a history of the URLs youve visited, which can be queried and revisited.

use WWW::Mechanize;
my $mech = WWW::Mechanize->new();

$mech->get( $url );

$mech->follow_link( n => 3 );
$mech->follow_link( text_regex => qr/download this/i );
$mech->follow_link( url => http://host.com/index.html );

$mech->submit_form(
form_number => 3,
fields => {
username => mungo,
password => lost-and-alone,
}
);

$mech->submit_form(
form_name => search,
fields => { query => pot of gold, },
button => Search Now
);

Mech is well suited for use in testing web applications. If you use one of the Test::*, like Test::HTML::Lint modules, you can check the fetched content and use that as input to a test call.

use Test::More;
like( $mech->content(), qr/$expected/, "Got expected content" );

Each page fetch stores its URL in a history stack which you can traverse.

$mech->back();

If you want finer control over over your page fetching, you can use these methods. follow_link and submit_form are just high level wrappers around them.

$mech->follow( $link );
$mech->find_link( n => $number );
$mech->form_number( $number );
$mech->form_name( $name );
$mech->field( $name, $value );
$mech->set_fields( %field_values );
$mech->set_visible( @criteria );
$mech->click( $button );

WWW::Mechanize is a proper subclass of LWP::UserAgent and you can also use any of LWP::UserAgents methods.

$mech->add_header($name => $value);

Please note that Mech does NOT support JavaScript. Please check the FAQ in WWW::Mechanize::FAQ for more.

WWW::Mechanize 1.18 Screenshot

Advertisements

WWW::Mechanize 1.18 Keywords

Bookmark WWW::Mechanize 1.18

Hyperlink code:
Link for forum:

WWW::Mechanize 1.18 Copyright

WareSeeker periodically updates pricing and software information of WWW::Mechanize 1.18 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of WWW::Mechanize 1.18 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
WWW::Mechanize::Pluggable provides all of the same functionality of WWW::Mechanize, but adds support for plugins. Free Download
WWW::Mechanize::Shell is an interactive shell for WWW::Mechanize. Free Download
WWW::Mechanize::Examples is a Perl module with sample programs that use WWW::Mechanize. Free Download
WWW::Yahoo::Groups::Mechanize is a Perl module to control WWW::Mechanize for WYG. Free Download
WWW::Mechanize::Plugin::HelloWorld is a sample WWW::Mechanize::Pluggable plugin. Free Download
WWW::Mechanize::Plugin::Cache is an automatic request caching for WWW::Mechanize::Pluggable. Free Download
Check4Change is a simple Firefox extension that allows you to periodically check a web-page for updates. Free Download
WWW::Mechanize::Plugin::Snapshot is a snapshot the Mech objects state. Free Download