From Test::Simple to Test::Extreme - Testing Legacy Systems 34

Testing Web Pages with WWW::Mechanize

  • WWW::Mechanize is scripted in Perl:

        use Test::More;
        $agent->follow('http://www.missiles-R-us.com/');
        like( $agent->{content}, qr/some text/, "Got expected content" );
    
  • WWW::Mechanize::Shell provides an interactive shell which can generate a WWW::Mechanize perl script

            > get http://www.missles-R-us.com/
            > value query "MX5"
            > click Search
            > history
    

 

YAPC::CA << Previous | Index | Next >>
Copyright © 2003 Michael Graham