Read-only release history for Test-WWW-Mechanize
Perl
Switch branches/tags
stable gitpan_version/1.44 gitpan_version/1.42 gitpan_version/1.40 gitpan_version/1.38 gitpan_version/1.36 gitpan_version/1.34 gitpan_version/1.32 gitpan_version/1.31_01 gitpan_version/1.30 gitpan_version/1.28 gitpan_version/1.26 gitpan_version/1.24 gitpan_version/1.23_01 gitpan_version/1.22 gitpan_version/1.20 gitpan_version/1.18 gitpan_version/1.16 gitpan_version/1.14 gitpan_version/1.12 gitpan_version/1.10 gitpan_version/1.08 gitpan_version/1.06 gitpan_version/1.05_02 gitpan_version/1.05_01 gitpan_version/1.04 gitpan_version/1.02 gitpan_version/1.00 gitpan_version/0.99 gitpan_version/0.06 gitpan_version/0.04 gitpan_version/0.02 gitpan_version/0.01 cpan_version/1.44 cpan_version/1.42 cpan_version/1.40 cpan_version/1.38 cpan_version/1.36 cpan_version/1.34 cpan_version/1.32 cpan_version/1.31_01 cpan_version/1.30 cpan_version/1.28 cpan_version/1.26 cpan_version/1.24 cpan_version/1.23_01 cpan_version/1.22 cpan_version/1.20 cpan_version/1.18 cpan_version/1.16 cpan_version/1.14 cpan_version/1.12 cpan_version/1.10 cpan_version/1.08 cpan_version/1.06 cpan_version/1.05_02 cpan_version/1.05_01 cpan_version/1.04 cpan_version/1.02 cpan_version/1.00 cpan_version/0.99 cpan_version/0.06 cpan_version/0.04 cpan_version/0.02 cpan_version/0.01 cpan_path/PETDANCE/Test-WWW-Mechanize-1.44.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.42.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.40.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.38.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.36.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.34.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.32.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.31_01.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.30.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.28.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.26.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.24.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.23_01.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.22.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.20.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.18.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.16.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.14.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.12.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.10.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.08.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.06.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.05_02.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.05_01.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.04.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.02.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-1.00.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-0.99.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-0.06.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-0.04.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-0.02.tar.gz cpan_path/PETDANCE/Test-WWW-Mechanize-0.01.tar.gz alpha PETDANCE
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
t
Changes
MANIFEST
META.json
META.yml
Makefile.PL
Mechanize.pm
README.md

README.md

Test-WWW-Mechanize

Test::WWW::Mechanize is a subclass of the Perl module WWW::Mechanize that incorporates features for web application testing. For example:

use Test::More tests => 5;
use Test::WWW::Mechanize;

my $mech = Test::WWW::Mechanize->new;
$mech->get_ok( $page );
$mech->base_is( 'http://petdance.com/', 'Proper <BASE HREF>' );
$mech->title_is( 'Invoice Status', "Make sure we're on the invoice page" );
$mech->text_contains( 'Andy Lester', 'My name somewhere' );
$mech->content_like( qr/(cpan|perl)\.org/, 'Link to perl.org or CPAN' );

This is equivalent to:

use Test::More tests => 5;
use WWW::Mechanize;

my $mech = WWW::Mechanize->new;
$mech->get( $page );
ok( $mech->success );
is( $mech->base, 'http://petdance.com', 'Proper <BASE HREF>' );
is( $mech->title, 'Invoice Status', "Make sure we're on the invoice page" );
ok( index( $mech->content( format => 'text' ), 'Andy Lester' ) >= 0, 'My name somewhere' );
like( $mech->content, qr/(cpan|perl)\.org/, 'Link to perl.org or CPAN' );

but has nicer diagnostics if they fail.

INSTALLATION

To install this module, run the following commands:

perl Makefile.PL
make
make test
make install

COPYRIGHT AND LICENSE

Copyright (C) 2004-2012 Andy Lester

This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.