in reply to A couple of questions about Win32::IEAutomation

I don't use that module but perhaps that security pop-up needs to be accessed via the popup method. See http://search.cpan.org/~prashant/Win32-IEAutomation-0.5/lib/Win32/IEAutomation.pm#POPUP_METHOD.

Cheers,
Rob
  • Comment on Re: A couple of questions about Win32::IEAutomation

Replies are listed 'Best First'.
Re^2: A couple of questions about Win32::IEAutomation
by sparkylu (Monk) on Oct 19, 2007 at 09:59 UTC
    I think I can help you with the second question .. a colleague faced and fixed this issue :)
    The problem with using getAllTables is that it creates a new object for Win32::IEAutomation::Element ... whereas it should be creating an object for Win32::IEAutomation::Table as Table.pm has the subroutine for rows.
    To fix this.. all you need to do is make a small modification to the IEAutomation.pm file ... Open the file and search for the following subroutine :
    sub getAllTables{ my $self = shift; my $agent = $self->{agent}; my @links_array; my $links = $agent->Document->all->tags("table"); for (my $n = 0; $n < $links->length; $n++){ my $link_object = Win32::IEAutomation::Element->new(); $link_object->{element} = $links->item($n); $link_object->{parent} = $self; push (@links_array, $link_object); } return @links_array; }
    In the lines :
    my $link_object = Win32::IEAutomation::Element->new(); $link_object->{element} = $links->item($n);
    change 'element' to 'table' It should look like this :
    my $link_object = Win32::IEAutomation::Table->new(); $link_object->{table} = $links->item($n);
    NOTE: Please pay attention to the case.
    save this.. run ur script .. it should work like a charm .. if it doesn't ... send me a msg and i'll mail you the IEAutomation.pm file which is working.
    Sparkz
      The modification to IEAutomation.pm worked great, thanks alot!

      Still no luck on the "Security Information" dialog.