
jojo101
New User
Aug 25, 2008, 1:32 AM
Post #1 of 5
(12121 views)
|
Problem with IEAutomation.pm
|
Can't Post
|
|
First let me take this oppurtunity to thank all the Friends who spends their precious time in solving others queries. Hi ,I am trying to automate one of my windows application using the CPAN module IEAutomation.pm by Prasahant Shewale.Following is my code - #!/usr/bin/perl use Win32::OLE; use Win32::IEAutomation; $IE = Win32::OLE->new("InternetExplorer.Application") || die "Could not start Internet Explorer.Application\n"; $IE = Win32::IEAutomation->new( visible => 1, maximize => 2); $IE->gotoURL('http://10.255.114.191/snmpconfig.html'); $IE->getButton('caption:',"Configure SNMP v1/v2c" )->Click; open(OUT, "E:/test/input.txt") || die; @lines = <OUT>; foreach $value (@lines) { $IE->getTextBox('name:',"get_comm_name")->SetValue("$value"); $IE->getButton('caption:',"Apply")->Click; sleep 5; my $popup = $ie->getPopupWindow("Request Acknowledged-Phaser 4510DT"); $popup->getTable('id:', "headingtext"); print $popup; } close OUT; Above script will open the application and enters the values fetching from the file input.txt to the textbox and click on Button.After clicking a message box will pops up saying "Request Acknowledged - No Errors Reported".My requirement is to read the message in the popup window and to be printed on the console. When i pass value to $title in method getPopupWindow($title),i am getting following error Can't call method "title" on an undefined value at E:/Perl/site/lib/win32/IEAutomation.pm line 542 I want to know whether this is an error in my code or any changes need to be done in module itself. Please anyone help on this.I will be more greatful to you guys.
|