if you want to get iframe then use following solution:
1)use SendKeys function for this.
2)if your popup windows is not recognized,then takes the url of popup windows using the regular expression(when link is javascript) otherwise use linkUrl(); for url.
open in same or differnet IE window and use according your requirment.
Friday, 20 May 2011
Win32:IEautomation script hangs after displaying popup window.
1)if this stuation occur then use following solutions:
a)After displaying popup window,it doesn't load page completly,thats why its goes into infinite loop.
so copy exists function and create one more function for click() like ClickWithoutWait() and remove WaitforDone line from this function.
Use ClickWithoutWait() function for displays popup window.
a)After displaying popup window,it doesn't load page completly,thats why its goes into infinite loop.
so copy exists function and create one more function for click() like ClickWithoutWait() and remove WaitforDone line from this function.
Use ClickWithoutWait() function for displays popup window.
Tuesday, 10 May 2011
how to get specific span link using Win32:IEAumation
Copy exists getLink() function and create one more function like getSpanLink().
changed following line
my $links = $agent->Document->links;
to
$inputs = $agent->Document->all->tags("span");
now you can use this function for all the html tag ,those having "span" tag.
changed following line
my $links = $agent->Document->links;
to
$inputs = $agent->Document->all->tags("span");
now you can use this function for all the html tag ,those having "span" tag.
how to access specific button using Win32:Ieautomation?
1)Copy exists _getObject function and create a new _getObject(like Sub _getObjectSpecific and add for loop for access spefific button.
2)Now create a any function for specific link/button/list...
For example:for specifc button
sub getSpecificButton{
my ($self, $how, $what,$i) = @_;
my $agent = $self->{agent};
my $buttons = $agent->Document->all->tags("input");
my $target_button = __getObject1($buttons, $how, $what,$i) if ($buttons);
my $button_object;
if ($target_button){
$button_object = Win32::IEAutomation::Element->new();
$button_object->{element} = $target_button;
$button_object->{parent} = $self;
}else{
$button_object = undef;
print "WARNING: No button is present in the document with your specified option $how $what\n" if $warn;
}
return $button_object;
}
2)Now create a any function for specific link/button/list...
For example:for specifc button
sub getSpecificButton{
my ($self, $how, $what,$i) = @_;
my $agent = $self->{agent};
my $buttons = $agent->Document->all->tags("input");
my $target_button = __getObject1($buttons, $how, $what,$i) if ($buttons);
my $button_object;
if ($target_button){
$button_object = Win32::IEAutomation::Element->new();
$button_object->{element} = $target_button;
$button_object->{parent} = $self;
}else{
$button_object = undef;
print "WARNING: No button is present in the document with your specified option $how $what\n" if $warn;
}
return $button_object;
}
How to get specific link using win32:IEautomation
use below link for solution:
http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html
http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html
Saturday, 7 May 2011
How to get link,those don't have "a herf " using win32:IEAutomation
Copy exists getLink function and create another function like getSpanLink and change below line:
my $links = $agent->Document->links;
change to
my $buttons = $agent->Document->all->tags("span");
Now you are able to access span link also.
my $links = $agent->Document->links;
change to
my $buttons = $agent->Document->all->tags("span");
Now you are able to access span link also.
Friday, 6 May 2011
How to use specific textbox and textarea when tags/class/name..etc(every thing) are same
use below link for solution:
http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html
http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html
Win32::IEAutomation not working with "button" tags
1)Win32::IEAutomation not working with "button" tags
Solution:
Copy exists getButton function and create a new function like get ButtonButtonTag and modify below mentioned line in your new function:
"my $buttons = $agent->Document->all->tags("input");"
changed to
"my $buttons = $agent->Document->all->tags("button"); "
Now you can use getButtonButtonTag function for "button" tag.
Like "getButtonButtonTag('class:',"getButton");"
Note: Don't modify your exists functions because it may be effect your exists scripts.
Solution:
Copy exists getButton function and create a new function like get ButtonButtonTag and modify below mentioned line in your new function:
"my $buttons = $agent->Document->all->tags("input");"
changed to
"my $buttons = $agent->Document->all->tags("button"); "
Now you can use getButtonButtonTag function for "button" tag.
Like "getButtonButtonTag('class:',"getButton");"
Note: Don't modify your exists functions because it may be effect your exists scripts.
Subscribe to:
Posts (Atom)