Timboh56 has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering whether there was any easier solution (any modules), I've tried IEautomation but that didn't work (gave me different errors) My code is as follows, but is unable to follow the link.
use Win32::IE::Mechanize; my $mech = Win32::IE::Mechanize->new( visible => 1); $mech->get(URL); sleep(3); my @links = $mech->links(); $mech->follow_link( text => "ServiceModel");
Mechanize is unable to pull any of the links, and it @links remains uninitialized.
The link, as it appears on the web app, looks like this, and is an image <TD class=Expander><A name=#ServiceModel><IMG id=ServiceModel onclick=compandTree(this) src="URL/images/tree.plus.gif"></A></TD>
Now I realize that my follow link method shouldn't work, because the link is an image, but either way, shouldn't mechanize be able to pull all links with the links() method, regardless of whether it is an image link, image link, etc?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with Win32 IE Mechanize
by Anonymous Monk on Jun 15, 2011 at 16:24 UTC | |
by Timboh56 (Initiate) on Jun 15, 2011 at 18:08 UTC |