Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

my First HTML based script.

by Anonymous Monk
on Oct 23, 2003 at 20:25 UTC ( [id://301700]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Untouchable Monks, Greetings.

I have a requirements to automate the followwing tasks. Also this is my first attemp with HTML, please bear with me.

1- start internet explorer and enter a url then press enter.

2- An authentication page popps up, enter user name and password then click the Enter button.

3- The returned page is a form (similar in layout to the ActiveState ActivePerl documentation). On the left hand side there is a vertical pane (static) and on the right hand side is the remainder of the form

4- Depending on what you select from the left pane will open a corresponding form. From the left hand pane I need to click on a url labled "CL Command". This action will display a new form in the right hand pane, in that form there is only one field and a button.

5- In the empty field I enter "server_fd ALL" command. Once I press Enter or click the run button (I think its labled run) a new display area appears under that field with information. I need to capture this information in an array or whatever, and do other stuff to it.

What I am trying to do is to obtain the storage volume information of a NASA/SAN solution. Its an EMC product called Celerra.
On every Celerra there is a linux based control workstation which most NAS/SAN administration can be achived using any browser. Since I have a number of these -each with a numbre of datamovers - which makes capacity monitoring be a bit hairy.

Since I haven't done any HTML then I haven't got a clue about to to proceed, So your help and advice is highly appreciated.

Replies are listed 'Best First'.
Re: my First HTML based script.
by monktim (Friar) on Oct 23, 2003 at 20:47 UTC
    You can use LWP to do it. There is also a package called Mechanize on CPAN you can use. It is a layer over LWP. You may want to get this book http://www.oreilly.com/catalog/perllwp/. Shop around, it's cheaper on Amazon.

    There's even a link with examples. http://examples.oreilly.com/perllwp/

    This will grab the html from the google homepage.

    use strict; use warnings; use LWP; my $browser; $browser = LWP::UserAgent->new() unless $browser; my $resp = $browser->get('http://www.google.com'); print "$resp->content\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://301700]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found