CC: | Nilesh Deshpande <dneels1980 [...] yahoo.com> |
Subject: | IEAutomation.pm Can not work on IE 11 and IE 10 Details of Errors below |
Date: | Tue, 15 Dec 2015 04:28:02 +0000 (UTC) |
To: | "bug-Win32-IEAutomation [...] rt.cpan.org" <bug-Win32-IEAutomation [...] rt.cpan.org> |
From: | dneels1980 <dneels1980 [...] yahoo.com> |
IEAutomation.pm Can not work on IE 11 and IE 10 Details of Errors below
1) Perl version
Show quoted text
scripts>perl -v
This is perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x64-multi-thread(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2015, Larry Wall
Binary build 2002 [299195] provided by ActiveState http://www.ActiveState.comBuilt Jul 20 2015 13:17:51
Perl may be copied only under the terms of either the Artistic License or theGNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found onthis system using "man perl" or "perldoc perl". If you have access to theInternet, point your browser at http://www.perl.org/, the Perl Home Page
2) Windows 7 Operating System.
3) Error 1Can't call method "readystate" on an undefined value at ../../perl_modules/Win32/IEAutomation.pm line 561.
So I commented line which waits for readyState
sub WaitforDone{ my $self = shift; my $agent = $self->{agent};# while ($agent->Busy || $agent->document->readystate ne "complete"){ sleep 1;# }}
4) Error 2
Can't call method "all" on an undefined value at ../../perl_modules/Win32/IEAutomation.pm line 290. "$inputs = $agent->Document->all;" has error.
sub getTextBox{ my ($self, $how, $what) = @_; my $agent = $self->{agent}; my ($inputs, $target_field); if ($how eq "beforetext:" || $how eq "aftertext:"){ $inputs = $agent->Document->all; }else{ $inputs = $agent->Document->all->tags("input"); } if ($inputs){ $target_field = __getObject($inputs, $how, $what, "text|password|file"); }5) My Source code
use strict;use Win32::OLE qw(in with);use Getopt::Std;use Win32::IEAutomation;use Win32::IEAutomation::WinClicker;use Win32::IEAutomation::Table;
use Cwd;use warnings;
use Win32::IEAutomation;
my $ie = Win32::IEAutomation->new( visible => 1);$ie->gotoURL('https://myportal/portal/login/login.do');
$ie->getTextBox('id:', "username")->SetValue('user');# also tried with name" It did not worked.$ie->getTextBox('name:', "username")->SetValue('user');
#;
#d;
Message body is not shown because it is too large.