in reply to Re: Win32::IEAutomation click link help
in thread Win32::IEAutomation click link help

I get this error: Can't call method "Click" on an undefined value at C:\lab\nbt3.pl line 56. and it does not show up as a link due to no href tag. I will check the additional information you provided links to. thanks!

  • Comment on Re^2: Win32::IEAutomation click link help

Replies are listed 'Best First'.
Re^3: Win32::IEAutomation click link help
by Anonymous Monk on Dec 23, 2011 at 17:28 UTC

    found solution by editing the the win32::IEAutomaiton module. addeded the below.

    sub getLink2{ my ($self, $how, $what) = @_; my $agent = $self->{agent}; #my $links = $agent->Document->links; my $links = $agent->Document->all->tags("a"); my $target_link = __getObject($links, $how, $what) if ($links); my $link_object; if ($target_link){ $link_object = Win32::IEAutomation::Element->new(); $link_object->{element} = $target_link; $link_object->{parent} = $self; }else{ $link_object = undef; print "WARNING: No link is present in the document with your +specified option $how $what\n" if $warn; } return $link_object; }
      thank you very much for posting your solution. I would have been stuck without this.