473,609 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Automate the Website using perl module

5 New Member
Hi All
I Have installed Active perl in my system and I am new to perl and automation...Co uld some one tell me how to install the perl modules and how to use those modules with the perl for autmating the website ... it will be very helpful for me to start automation...
Oct 10 '08 #1
8 4218
vijayarl
65 New Member
Hi there,

To install the perl modules can refer this link:

http://theoryx5.uwinni peg.ca/CPAN/perl/pod/perlmodinstall. html

To answer your 2nd question, it's better to get it from the perl experts from this forum as even am newbiee to perl.

Regards,
Vijayarl
Oct 10 '08 #2
numberwhun
3,509 Recognized Expert Moderator Specialist
CPAN provides excellent documentatio on installing perl modules. To use the module, you would first install it, then, specify it in the beginning of your Perl script as such:

Expand|Select|Wrap|Line Numbers
  1. use DBI;
  2.  
or even:

Expand|Select|Wrap|Line Numbers
  1. use Config::Scoped;
  2.  
Those are real module examples. What you put will depend on what module you are using. To use a module, you have to look at its page on CPAN as it will instruct you in its use.

Regards,

Jeff
Oct 10 '08 #3
KevinADC
4,059 Recognized Expert Specialist
If you are using active perl you use the PPM application to install modules. Activeperl comes with a lot of documentation, so find the documentation (in the activeperl folder) and read it.

Automation could mean anything so there is no way to help with that unless you specify what you want or are trying to do.
Oct 10 '08 #4
gajendra98
5 New Member
If you are using active perl you use the PPM application to install modules. Activeperl comes with a lot of documentation, so find the documentation (in the activeperl folder) and read it.

Automation could mean anything so there is no way to help with that unless you specify what you want or are trying to do.
Hi Kevin Thanks for ur reply

What i have to do is I want to Login in to my site by entering username and password and later i want to click on any button for furthur process..

And i am working on windows machine ie Windows XP...
Oct 13 '08 #5
über
31 New Member
This might help
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. #-----------------------------
  3. # GET REQUEST
  4. #
  5. use LWP::Simple;
  6. use URI::URL;
  7.  
  8. my $url = url('http://login.yahoo.com/');
  9. $url->query_form(username => 'peter', password => 'secret');
  10. $content = get($url);
  11.  
  12. #-----------------------------
  13. # POST REQUEST
  14. #
  15. use HTTP::Request::Common qw(POST);
  16. use LWP::UserAgent;
  17.  
  18. $ua = LWP::UserAgent->new();
  19. my $req = POST 'http://login.yahoo.com/',
  20.    [ username => 'peter', password => 'secret' ];
  21. $content = $ua->request($req)->as_string;
Oct 13 '08 #6
numberwhun
3,509 Recognized Expert Moderator Specialist
This might help
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. #-----------------------------
  3. # GET REQUEST
  4. #
  5. use LWP::Simple;
  6. use URI::URL;
  7.  
  8. my $url = url('http://login.yahoo.com/');
  9. $url->query_form(username => 'peter', password => 'secret');
  10. $content = get($url);
  11.  
  12. #-----------------------------
  13. # POST REQUEST
  14. #
  15. use HTTP::Request::Common qw(POST);
  16. use LWP::UserAgent;
  17.  
  18. $ua = LWP::UserAgent->new();
  19. my $req = POST 'http://login.yahoo.com/',
  20.    [ username => 'peter', password => 'secret' ];
  21. $content = $ua->request($req)->as_string;
Just a bit of advice Uber, it is highly advised and recommended in "Perl Best Practices" to put all of your "use" statements at the top of your script. You don't want to scatter them throughout your script or finding dependencies for scripts will be hell for others. I, personally, would not want to support code that did something like that. I have supported some pretty bad code and it is never fun!

Regards,

Jeff
Oct 13 '08 #7
gajendra98
5 New Member
Just a bit of advice Uber, it is highly advised and recommended in "Perl Best Practices" to put all of your "use" statements at the top of your script. You don't want to scatter them throughout your script or finding dependencies for scripts will be hell for others. I, personally, would not want to support code that did something like that. I have supported some pretty bad code and it is never fun!

Regards,

Jeff
Hey jeff..Thnk u very much..

And one thing i want to know is i can run these scripts in perl express right? or do i need to run in any other toll..Just mention those if possible..
Basically perl express is a editor i am using right now.....

And actually LWP module is itself installed while installing active perl in my sys....ie..LWP perl module pogram is existing in the path C:\Perl\lib\LWP

Do i need to install again if i use these in my scripts

Thanks in advance
Oct 16 '08 #8
numberwhun
3,509 Recognized Expert Moderator Specialist
Hey jeff..Thnk u very much..

And one thing i want to know is i can run these scripts in perl express right? or do i need to run in any other toll..Just mention those if possible..
Basically perl express is a editor i am using right now.....

And actually LWP module is itself installed while installing active perl in my sys....ie..LWP perl module pogram is existing in the path C:\Perl\lib\LWP

Do i need to install again if i use these in my scripts

Thanks in advance
If its installed, then no, you shouldn't have to install them again, just the once. I don't know anything about Perl Express, but when you run perl scripts, you should really be running them from the command line to test them. Use the following format for that:

Expand|Select|Wrap|Line Numbers
  1. c:> perl scriptname.pl
  2.  
Oct 16 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2402
by: Keith | last post by:
All: What is the difference between Perl (CGI) and PHP (Apache module)? I thought both used servers to direct the user to the appropiate Perl or PHP program in order to execute the program to interpret the user's Perl or PHP script respectively. Keith
17
3091
by: Michael McGarry | last post by:
Hi, I am just starting to use Python. Does Python have all the regular expression features of Perl? Is Python missing any features available in Perl? Thanks, Michael
2
2534
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # suppose you want to fetch a webpage. from urllib import urlopen print urlopen('http://xahlee.org/Periodic_dosage_dir/_p2/russell-lecture.html').read() # note the line # from <library_name> import <function_name1,function_name2...>
1
1923
by: Someone | last post by:
there's a korn shell script that i would like to wrap a perl script around to automate it, as a task i need to do always chooses the same options from this script (it's menu driven). can i somehow redirect my perl scripts stdout to print to this scripts stdin? does that make sense? thanks. sean rowe
2
2877
by: vallinayagam | last post by:
I wish to know how to automate data entry in web pages using perl. Thanks in advance.
6
2533
by: Doomster | last post by:
In a previous job, we had Perl scripts which could interact with a SQL DB using Perl's DBI module We were able to programmatically add, delete and query tables using this module. Is it possible to do something similiar with Perl? (and not VBA)??? The reason I ask is because I want to use Access instead of MySQL because with Access, I can design Forms and Queries to display data relatively quickly. With MySQL, I'd have to use third...
10
3827
by: rdps | last post by:
hello, I am trying to open up a webpage, say "http://gmail.com", enter username, passwd, click on submit button and do loads of other things - ALL THROUGH AUTOMATION, writing a script in python. I tried my hands at cPAMIE but facing prbs regading the ids of the gui elements i.e. the places where id of a particular gui element is not mentioned in the htm source file, we cannot use the cPAMIE methods. I am trying my hands at...
0
1425
by: raghavendrap | last post by:
Hello friends, I need help to automate verilog modules. Suppose i have verilog modules ax.v, bx.v, cx.v, dx.v ---------- individual modules, ab.v ----------------- contains instantes of ax.v,bx.v cd.v ----------------- contains instances of cx.v,dx.v abcd.v -------- top-level module contains instances of ab.v, cd.v ...
2
6379
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
0
8588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8556
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8410
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6068
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2541
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1690
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.