The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can anyone recommend a book for perl WIN32 popeye Shell Programming and Scripting 1 05-22-2008 01:49 AM
Perl in Win32 Paris Heng Windows & DOS: Issues & Discussions 1 04-07-2008 02:17 AM
execution status of gotoURL in Win32::IEAutomation gurukottur Shell Programming and Scripting 2 11-22-2007 03:27 AM
perl win32::ieautomation gurukottur Shell Programming and Scripting 0 11-06-2007 08:59 AM
Perl: Run perl script in the current process vino Shell Programming and Scripting 10 12-09-2005 10:45 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2007
gurukottur gurukottur is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 40
perl script using Win32::IEAutomation

Hi Folks,

I am using Perl module Win32::IEAutomation for automating a web page which is implented using iceface.

I am trying to click on a image which has the following html code:

<input alt="Incidents" class="iceCmdBtn" id="_id68:_id79" name="_id68:_id79" onblur="setFocus('');" onclick="iceSubmit(form,this,event);return false;" onfocus="setFocus(this.id);" src="/ipss/images/avaya/esp/nav_inc_def.bmp" type="image">

I'm using the below code to click on the above image in my script:

$ie->getImage('alt:',"Incidents")->Click;

But I get the below error when I run my script:
Can't call method "Click" on an undefined value at ieauto.pl line 23.

I tried other attributes of getImage like class, id, imgurl ..., but still I am unble to redirect my page to the desired link.

My script works fine with other web pages, but with Iceface I think there is a problem recognizing the objects.

Please help me in this as this is blocking my work.

Please treat it as important.

Thanks in advance

Guru Charan
  #2 (permalink)  
Old 10-24-2007
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
Try replacing this
Code:
$ie->getImage('alt:',"Incidents")->Click;
with this
Code:
$ie->getImage('linktext:',"Incidents")->Click;
This will work if the alt attribute of that image is Incidents
  #3 (permalink)  
Old 10-24-2007
gurukottur gurukottur is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 40
Its still the same problem.

I tried the command
$ie->getImage('linktext:',"Incidents")->Click;

No luck

If I use class to get the Image and there are more than one objects of the same class. How do I differentiate them and click on the object I desire.
ex:
$ie->getImage('class:',"IceGphImg")->Click;
But my page contains other images of same class.
can I do something like this:
$ie->getImage('class:',"IceGphImg")->getImage('alt:',"Incidents")->Click;

Thanks for the reply
  #4 (permalink)  
Old 10-25-2007
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
$ie->getImage('class:',"IceGphImg")->getImage('alt:',"Incidents")->Click; would produce error

One way of debugging I can think is (need not be the optimal way): get a list of all images on the form using getAllImages() function. In this list, check the attributes of the image on which you wish to click. If you find any unique attribute, use it as argument to getImage() function.
  #5 (permalink)  
Old 10-26-2007
gurukottur gurukottur is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 40
yogesh,

thanks for your responses.

I am trying getAllImages on my web page and reading them to an array,but when I print the array element, I get the o/p as Win32::IEAutomation::Element=Hash<0x123>
How can I recognize the image with above value. How do I get the required attribute.

The problem with my web page is that all the attributes ie alt,class,id,name etc are dynamic and keep changing, so I am unable to click on them.

Is there a way I can click on these attriburtes.

Thanks,
Guru
  #6 (permalink)  
Old 10-29-2007
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
Use the Data:: Dumper module to print that array. For example, convert this:
Code:
print @all_images_array;
to this:
Code:
use Data::Dumper;
print Dumper (@all_images_array);
This will list all the contents of array. Then you may be able to see all the attributes.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0