Have you tried giving it an absolute URL? "I got an error" is not a strange state of affairs. If you read it, with the assumption that it is meant to be useful, and looking up terms you don't understand, then you will often find that the error message tells you everything you need to solve it.
Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).
| [reply] |
#!/usr/bin/perl --
use strict;
use warnings;
use WWW::Mechanize;
my $ua = WWW::Mechanize->new(
autocheck => 1,
);
$ua->get('nice try');
__END__
Error GETing nice%20try: URL must be absolute at - line 9
| [reply] [d/l] |
At this moment, I am struck at another point. I am screen scraping a GUI.
This is the code I have till now.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $url='file:///C:/Program%20Files/abcde/index.html';
my $obj = LWP::UserAgent->new;
$obj->credentials(
'192.0.0.0',
'12345',
'admin' => 'admin'
);
my $resp = $obj->get($url);
print "SUCCESS ", $resp->content, "\n\n";
I need to navigate to the middle of the menu. Is it possible to do that in Perl?
Thanks,
Anusha
| [reply] |
| [reply] [d/l] |
The problem is I have an User Interface in servlet. I have my Menu bar (Navigation toolbar) like
|
|-"System"
|-"Alarms"
|-"Trunks"
|-"Resources"
|-"Networking".
I want to navigate to "Resources" and that will display a screen. I have to grap values in that screen.
This is what I am intending to do... Any help???
Thanks,
Anusha
| [reply] [d/l] |