in reply to Script-based filling of free-text entries on HTML pages

WWW::Mechanize
  • Comment on Re: Script-based filling of free-text entries on HTML pages

Replies are listed 'Best First'.
Re^2: Script-based filling of free-text entries on HTML pages
by pat_mc (Pilgrim) on Aug 14, 2008 at 16:34 UTC
    Thanks, ikegami.

    I tried WWW:Mechanize but could not get the extraction of inputs or images to work. I used the following code:
    #! /usr/bin/perl -w use strict; use WWW::Mechanize; my $mech = WWW::Mechanize -> new(); $mech -> get( 'http://www.merriam-webster.com/' ); for my $input ( $mech -> find_all_inputs() ) { printf $input -> name(), $input -> type(), "\n"; } for my $image ( $mech -> find_all_images() ) { printf "%-100s %s\n", $image -> image(), image -> tag(); }


    I get error messages of the type
    Can't locate object method "find_all_inputs" via package "WWW::Mechanize" at test.pl line ...
    Any ideas why this is not working?

    Thanks and regards -

    Pat