Hi folks

After a number of weeks I'm returning to my poject to automate some file 
downloads.  I've installed Win32::Watir and typed in the example program.

However, it doesn't run. I've had a look at the code and I can't see why it is 
complaining. Can anyone help

Gary

C:\Documents and Settings\user1\My Documents>type watir_test.pl
use Win32::Watir;

my $ie = Win32::Watir::new(
 visible => 1,
 maximize =>1
);
$ie->goto("http://www.google.co.uk";);
$ie->text_field('name:',"q")->setvalue("Perl Win3::Watir");


C:\Documents and Settings\user1\My Documents>perl watir_test.pl
Odd number of elements in hash assignment at 
C:/strawberry/perl/site/lib/Win32/W
atir.pm line 102.
Can't locate object method "_check_os_name" via package "visible" at 
C:/strawber
ry/perl/site/lib/Win32/Watir.pm line 106.



The new() method looks like:
sub new {
        my $class = shift;
        my %opts = @_;            # Line 102
        $opts{visible} = 1  unless (exists $opts{visible});
        $warn = $opts{warnings} if (exists $opts{warnings});
        my $self = bless (\%opts, $class);
        $self->_check_os_name();    # line 106
        if ( $opts{'ie'} or $opts{'find'} ){
                return $self->_startCustomIE();
        } else {
                return $self->_startIE();
        }
}

-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to