SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
   
    WWW::Mechanize
    Márcio Vitor De Matos Silva ­ cromo.jml@gmail.com




                            
WWW::Mechanize

      Criador e Project Owner 
      Andy Lester 'PetDance'

             Licença 
        Artistic License/GPL

         Versão estável 
         1.34 – 09/12/2007

     Versão desenvolvimento 
       1.49_01 – 27/09/2008 
                   
Usos úteis e comuns 
     Preenchimento de formulários

     Percorrer e clicar links

     Testes automatizados

     Enviar referers, user­agents, uso de  proxys

     Acessar histórico de urls visitados
                      
De onde vem a força ?
         LWP::UserAgent
         HTTP::Request
         HTTP::Cookies
         HTML::TokeParser
         URI
         ...

                
LWP::UserAgent
            WWW::Mechanize


     Conceitos e propósitos diferentes.


  Mechanize abstrai dificuldades do 
LWP::UserAgent


                         
Ambiente
    Instalação
     cpan> install WWW::Mechanize
    Documentação
     perldoc WWW::Mechanize
    Uso
     use WWW::Mechanize;
    Construtor
     my $mech = WWW::Mechanize­>new();
                     
Capturando uma página

    use WWW::Mechanize;
    my $mech = WWW::Mechanize­>new();
    $mech­>get(“http://www.retbeer.com/”);
    print $mech­>title.$/;



                      
$mech­>agent

  Get/set que define o user­agent usado durante 
a navegação

  Também pode ser definida no método 
construtor:
    my $mech = WWW::Mechanize­>new( agent => 
     ’wonderbot 1.01’ );

                          
Enviando um agent
    my $mech = new WWW::Mechanize;
    $mech­>get('http://www.perl.org.br');
    $mech­>agent(“TestBot/1.0”);
    if($mech­>success) {
       print $mech­>content;
    }
    else {
       print $mech­>response­>error_as_HTML;
    }
                      
$mech­>add_header
   Permite adicionar parâmetros ao header da 
requisição

$mech­>add_header( Referer => 
'http://www.retbeer.com' );

$mech­>add_header( Referer => undef );

$mech­>add_header( Encoding => ’text/klingon’ );
                         
$mech­>find_all_links
 
   Retorna todos os links seguindo algum 
critério:
    $mech­>get( $url );
    my @links = $mech­>find_all_links( text_regex 
 => qr/Cinema/i );
    foreach my $link (@links)  {
                $mech­>get( $link­>url_abs );
                return $mech­>content;
     }                          
$mech­>follow_link
       'Clica' o link seguinte o critério escolhido

    $mech­>get('http://www.retbeer.com');
    foreach my $categoria qw(vinho cerveja vodka) {
       $mech­>follow_link( text_regex => qr/$categoria/i );
       if ($mech­>success) {
           print $categoria.$/;
           print $mech­>content;
           $mech­>back;
 
       }                         

    }
$mech­>submit_form

     Formulários por form_number/form_name

     Preenchimento de campos

     Submit de forms



                              
                           
Submetendo um formulário
          use WWW::Mechanize; 
          my $mech = WWW::Mechanize­>new(); 
          $mech­>get( 'http://www.retbeer.com' ); 

          $mech­>submit_form( 
                    form_name => 'form_login', 
                    fields      => { 
                        username    => 'mungo', 
                        password    => 'lost­and­alone', 
                    } 
               );                   
Test::WWW::Mechanize

    Sub classe WWW::Mechanize
   Incorpora features para testes de aplicações 
web:
       Base
       Conteúdo html
       Links
       Formulários

                          
Realizando testes
    use Test::WWW::Mechanize;
    use Test::More tests => 4;

    my $mech = Test::WWW::Mechanize­>new;
    $mech­>get_ok( 'http://www.perl.org.br/ ');
    $mech­>base_is( 'http://www.perl.org.br/Main/WebHome' ,quot;Basequot;);
    $mech­>title_is( quot;Perl Brasil ­ WebHomequot;,quot;Titlequot;);
    $mech­>content_contains( quot;Artigos quot;,quot;Artigosquot; );


    # perl  teste_perlbr.pl
    1..4
    ok 1 ­ GET http://www.perl.org.br/ 
    ok 2 ­ Base
    ok 3 ­ Title
    ok 4 ­ Artigos                         
Exemplo de uso real
        my $login    = quot;login_namequot;;
        my $password = quot;passwordquot;;
        my $folder   = quot;folderquot;;
        my $url = quot;http://img78.photobucket.com/albums/v281/$login/$folder/quot;;
        # login to your photobucket.com account
        my $mech = WWW::Mechanize­>new();
        $mech­>get($url);
        $mech­>submit_form(
            form_number => 1,
            fields      => { password => $password },
        );
        die unless ($mech­>success);
        # upload image files specified on command line
        foreach (@ARGV) {
            print quot;$_nquot;;
            $mech­>form_number(2);
            $mech­>field('the_file[]' => $_);
            $mech­>submit();
        }                                  
Referências

                       CPAN
          http://search.cpan.org/dist/WWW­
          Mechanize/lib/WWW/Mechanize.pm 
                      Mailing list 
    http://groups.google.com/group/www­mechanize­
                           users
                     Google Code 
       http://code.google.com/p/www­mechanize/
                          
Fontes de pesquisa:
     man WWW::Mechanize
     Spidering Hacks
      HEMENWAY, Kevin e CALISHAIN, Tara. 
      Cambridge, Massachusetts: O'Reilly, 2003.
      ISBN 0­596­00577­6.
     Automated web site testing with WWW::Mechanize 
     with Andy Lester
      http://www.webgui.org/wgtv/wwwmechanize

                           
THE END



        

Más contenido relacionado

La actualidad más candente

Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale teslaecoe...
Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale  teslaecoe...Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale  teslaecoe...
Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale teslaecoe...
Miroslav Miskovic
 
WordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin PagesWordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin Pages
Brandon Dove
 

La actualidad más candente (20)

Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale teslaecoe...
Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale  teslaecoe...Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale  teslaecoe...
Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale teslaecoe...
 
So you want to build a Facebook app
So you want to build a Facebook appSo you want to build a Facebook app
So you want to build a Facebook app
 
Clearance: Simple, complete Ruby web app authentication.
Clearance: Simple, complete Ruby web app authentication.Clearance: Simple, complete Ruby web app authentication.
Clearance: Simple, complete Ruby web app authentication.
 
RSpec User Stories
RSpec User StoriesRSpec User Stories
RSpec User Stories
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)
 
Fast by Default
Fast by DefaultFast by Default
Fast by Default
 
Object Exercise
Object ExerciseObject Exercise
Object Exercise
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With Blogging
 
Changing Template Engine
Changing Template EngineChanging Template Engine
Changing Template Engine
 
Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4
 
My PPP Project / Digital Resume
My PPP Project / Digital ResumeMy PPP Project / Digital Resume
My PPP Project / Digital Resume
 
Turbogears Presentation
Turbogears PresentationTurbogears Presentation
Turbogears Presentation
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
 
Nodejs.meetup
Nodejs.meetupNodejs.meetup
Nodejs.meetup
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)
 
Secure WordPress Development Practices
Secure WordPress Development PracticesSecure WordPress Development Practices
Secure WordPress Development Practices
 
WordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin PagesWordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin Pages
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LABHTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
HTTP REQUEST RESPONSE OBJECT - WEB APPLICATION USING C# LAB
 
High-Quality JavaScript
High-Quality JavaScriptHigh-Quality JavaScript
High-Quality JavaScript
 

Destacado (7)

Twittness - O Twitter em forma de solução para os negócios
Twittness - O Twitter em forma de solução para os negóciosTwittness - O Twitter em forma de solução para os negócios
Twittness - O Twitter em forma de solução para os negócios
 
Twittness
TwittnessTwittness
Twittness
 
ITIL versus COBIT - Um breve comparativo
ITIL versus COBIT - Um breve comparativoITIL versus COBIT - Um breve comparativo
ITIL versus COBIT - Um breve comparativo
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 

Similar a WWW:::Mechanize YAPC::BR 2008

Professional JavaScript Development - Creating Reusable Code
Professional JavaScript Development -  Creating Reusable CodeProfessional JavaScript Development -  Creating Reusable Code
Professional JavaScript Development - Creating Reusable Code
Wildan Maulana
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
 
Scaling Rails Presentation
Scaling Rails PresentationScaling Rails Presentation
Scaling Rails Presentation
eraz
 
Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote
ask bills
 
Merb Pluming - The Router
Merb Pluming - The RouterMerb Pluming - The Router
Merb Pluming - The Router
carllerche
 
So you want to build a facebook App ?
So you want to build a facebook App ?So you want to build a facebook App ?
So you want to build a facebook App ?
Nguyễn Duy Nhân
 

Similar a WWW:::Mechanize YAPC::BR 2008 (20)

More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Satchmo
SatchmoSatchmo
Satchmo
 
Professional JavaScript Development - Creating Reusable Code
Professional JavaScript Development -  Creating Reusable CodeProfessional JavaScript Development -  Creating Reusable Code
Professional JavaScript Development - Creating Reusable Code
 
Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
 
Neil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do ItNeil Patel - What You Need to be Measuring and How to Do It
Neil Patel - What You Need to be Measuring and How to Do It
 
Scaling Rails Presentation
Scaling Rails PresentationScaling Rails Presentation
Scaling Rails Presentation
 
Perlbal Tutorial
Perlbal TutorialPerlbal Tutorial
Perlbal Tutorial
 
Esposito Ajax Remote
Esposito Ajax RemoteEsposito Ajax Remote
Esposito Ajax Remote
 
Blueprint talk at Open Hackday London 2009
Blueprint talk at Open Hackday London 2009Blueprint talk at Open Hackday London 2009
Blueprint talk at Open Hackday London 2009
 
REST, the internet as a database?
REST, the internet as a database?REST, the internet as a database?
REST, the internet as a database?
 
Developing PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan FrameworkDeveloping PHP Web Applications with the Raxan Framework
Developing PHP Web Applications with the Raxan Framework
 
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle TwitterAugust 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
 
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / WidgetsFVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
 
Spyware/Malware FVCP
Spyware/Malware  FVCPSpyware/Malware  FVCP
Spyware/Malware FVCP
 
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
 
Merb Pluming - The Router
Merb Pluming - The RouterMerb Pluming - The Router
Merb Pluming - The Router
 
Sinatra
SinatraSinatra
Sinatra
 
So you want to build a facebook App ?
So you want to build a facebook App ?So you want to build a facebook App ?
So you want to build a facebook App ?
 

Último

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

WWW:::Mechanize YAPC::BR 2008

  • 1.     WWW::Mechanize Márcio Vitor De Matos Silva ­ cromo.jml@gmail.com    
  • 2. WWW::Mechanize  Criador e Project Owner  Andy Lester 'PetDance' Licença  Artistic License/GPL Versão estável  1.34 – 09/12/2007 Versão desenvolvimento    1.49_01 – 27/09/2008   
  • 3. Usos úteis e comuns   Preenchimento de formulários  Percorrer e clicar links  Testes automatizados  Enviar referers, user­agents, uso de  proxys  Acessar histórico de urls visitados    
  • 4. De onde vem a força ?  LWP::UserAgent  HTTP::Request  HTTP::Cookies  HTML::TokeParser  URI  ...    
  • 5. LWP::UserAgent WWW::Mechanize  Conceitos e propósitos diferentes.  Mechanize abstrai dificuldades do  LWP::UserAgent    
  • 6. Ambiente Instalação cpan> install WWW::Mechanize Documentação perldoc WWW::Mechanize Uso use WWW::Mechanize; Construtor my $mech = WWW::Mechanize­>new();    
  • 7. Capturando uma página use WWW::Mechanize; my $mech = WWW::Mechanize­>new(); $mech­>get(“http://www.retbeer.com/”); print $mech­>title.$/;    
  • 8. $mech­>agent Get/set que define o user­agent usado durante  a navegação Também pode ser definida no método  construtor: my $mech = WWW::Mechanize­>new( agent =>  ’wonderbot 1.01’ );    
  • 9. Enviando um agent my $mech = new WWW::Mechanize; $mech­>get('http://www.perl.org.br'); $mech­>agent(“TestBot/1.0”); if($mech­>success) { print $mech­>content; } else { print $mech­>response­>error_as_HTML; }    
  • 11. $mech­>find_all_links   Retorna todos os links seguindo algum  critério:    $mech­>get( $url );    my @links = $mech­>find_all_links( text_regex  => qr/Cinema/i );    foreach my $link (@links)  {                $mech­>get( $link­>url_abs );                return $mech­>content;   }  
  • 12. $mech­>follow_link  'Clica' o link seguinte o critério escolhido $mech­>get('http://www.retbeer.com'); foreach my $categoria qw(vinho cerveja vodka) { $mech­>follow_link( text_regex => qr/$categoria/i ); if ($mech­>success) { print $categoria.$/; print $mech­>content;     $mech­>back;   }   }
  • 13. $mech­>submit_form  Formulários por form_number/form_name  Preenchimento de campos  Submit de forms            
  • 14. Submetendo um formulário      use WWW::Mechanize;       my $mech = WWW::Mechanize­>new();       $mech­>get( 'http://www.retbeer.com' );       $mech­>submit_form(                 form_name => 'form_login',                 fields      => {                     username    => 'mungo',                     password    => 'lost­and­alone',                 }              );   
  • 15. Test::WWW::Mechanize   Sub classe WWW::Mechanize  Incorpora features para testes de aplicações  web:  Base  Conteúdo html  Links  Formulários    
  • 16. Realizando testes use Test::WWW::Mechanize; use Test::More tests => 4; my $mech = Test::WWW::Mechanize­>new; $mech­>get_ok( 'http://www.perl.org.br/ '); $mech­>base_is( 'http://www.perl.org.br/Main/WebHome' ,quot;Basequot;); $mech­>title_is( quot;Perl Brasil ­ WebHomequot;,quot;Titlequot;); $mech­>content_contains( quot;Artigos quot;,quot;Artigosquot; ); # perl  teste_perlbr.pl 1..4 ok 1 ­ GET http://www.perl.org.br/  ok 2 ­ Base ok 3 ­ Title   ok 4 ­ Artigos  
  • 17. Exemplo de uso real     my $login    = quot;login_namequot;;     my $password = quot;passwordquot;;     my $folder   = quot;folderquot;;     my $url = quot;http://img78.photobucket.com/albums/v281/$login/$folder/quot;;     # login to your photobucket.com account     my $mech = WWW::Mechanize­>new();     $mech­>get($url);     $mech­>submit_form(         form_number => 1,         fields      => { password => $password },     );     die unless ($mech­>success);     # upload image files specified on command line     foreach (@ARGV) {         print quot;$_nquot;;         $mech­>form_number(2);         $mech­>field('the_file[]' => $_);         $mech­>submit();       }  
  • 18. Referências CPAN http://search.cpan.org/dist/WWW­ Mechanize/lib/WWW/Mechanize.pm  Mailing list  http://groups.google.com/group/www­mechanize­ users Google Code  http://code.google.com/p/www­mechanize/    
  • 19. Fontes de pesquisa:  man WWW::Mechanize  Spidering Hacks HEMENWAY, Kevin e CALISHAIN, Tara.  Cambridge, Massachusetts: O'Reilly, 2003. ISBN 0­596­00577­6.  Automated web site testing with WWW::Mechanize   with Andy Lester http://www.webgui.org/wgtv/wwwmechanize