[selenium-users] Running a selenium Perl script using Selenium RC

225 views
Skip to first unread message

Shivaraju CM

unread,
Apr 26, 2010, 7:30:39 AM4/26/10
to Selenium Users, cm.sh...@yahoo.co.in
Hi all,

I am using Selenium Perl to automate one web application. Can
you please help me to import Selenium-Perl api to my script. I am
using ActivePerl to create and run the test scripts.
I am getting error at
use Test::WWW::Selenium statement.

Thanks & Regards,
Shivu

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Rajat Jindal

unread,
Apr 26, 2010, 10:34:00 PM4/26/10
to Selenium Users
Hi Shivaraju,

Just add the selenium perl library path to your PERL5LIB environment
variable. Also, you need to have WWW::Selenium instead of
Test::WWW::Selenium I suppose. Please try these and let me know if it
helps.

Thanks,
Rajat Jindal
http://quicksilver1183-tech.blogspot.com

MARK KUR

unread,
Apr 27, 2010, 2:30:04 PM4/27/10
to seleniu...@googlegroups.com
Hi Shivaraju,

If you are using ActivePerl on Windows, you have several ways to point Perl to the location of the Selenuim Perl driver. One way to do so is by adding the following instruction at the beginning of you Perl script:

BEGIN {
push(@INC,"[your_path]/selenium-remote-control-1.0.1/selenium-perl-client-driver-1.0.1/lib");
}

Another way is to add push(@INC,"[your_path]/selenium-remote-control-1.0.1/selenium-perl-client-driver-1.0.1/lib"); to the sitecustomise.pl file in your ~/perl/site/lib directory.

As to the necessary Selenium modules, when you use Selenium IDE (FireFox plug-in), it automatically adds the following set of Selenium modules to the Perl scripts that it generates:

use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;

I have not tried removing any of these. If you use just WWW::Selenium instead of Test::WWW::Selenium, you will lose all the reporting/logging capabilities of Selenium commands execution success/failure (that is, you can use all the commands, like sel->click() or sel->is_element_present(), but not sel->click_ok() nor sel->is_element_present_ok(), for instance).

Best,
Mark


From: Rajat Jindal <rajatj...@gmail.com>
To: Selenium Users <seleniu...@googlegroups.com>
Sent: Mon, April 26, 2010 7:34:00 PM
Subject: [selenium-users] Re: Running a selenium Perl script using Selenium RC

Hi Shivaraju,

Just add the selenium perl library path to your PERL5LIB environment
variable. Also, you need to have WWW::Selenium instead of
Test::WWW::Selenium I suppose. Please try these and let me know if it
helps.

Thanks,
Rajat Jindal
http://quicksilver1183-tech.blogspot.com

On Apr 26, 4:30 pm, Shivaraju CM <shivaraj...@gmail.com> wrote:
> Hi all,
>
>         I am using Selenium Perl to automate one web application. Can
> you please help me to import Selenium-Perl api to my script. I am
> using ActivePerl to create and run the test scripts.
> I am getting error at
> use Test::WWW::Selenium statement.
>
> Thanks & Regards,
> Shivu
>
> --
> You received this message because you are subscribed to the Google Groups "Selenium Users" group.
> To post to this group, send email to seleniu...@googlegroups.com.
> To unsubscribe from this group, send email to selenium-users+unsub...@googlegroups.com.

> For more options, visit this group athttp://groups.google.com/group/selenium-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Reply all
Reply to author
Forward
0 new messages