![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can anyone recommend a book for perl WIN32 | popeye | Shell Programming and Scripting | 1 | 05-21-2008 10:49 PM |
| Perl in Win32 | Paris Heng | Windows & DOS: Issues & Discussions | 1 | 04-06-2008 11:17 PM |
| execution status of gotoURL in Win32::IEAutomation | gurukottur | Shell Programming and Scripting | 2 | 11-21-2007 11:27 PM |
| perl win32::ieautomation | gurukottur | Shell Programming and Scripting | 0 | 11-06-2007 04:59 AM |
| Perl: Run perl script in the current process | vino | Shell Programming and Scripting | 10 | 12-09-2005 06:45 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
|||
|
Try replacing this
Code:
$ie->getImage('alt:',"Incidents")->Click;
Code:
$ie->getImage('linktext:',"Incidents")->Click;
|
|
|||
|
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 |
|
|||
|
$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. |
|
|||
|
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 |
|
|||
|
Use the Data:: Dumper module to print that array. For example, convert this:
Code:
print @all_images_array; Code:
use Data::Dumper; print Dumper (@all_images_array); |
|||
| Google UNIX.COM |