1

I want to use Selenium RC with a Perl client driver. How can I configure Selenium RC with Perl?

2 Answers 2

2

Use the WWW::Selenium module to link up to Selenium RC.

You will need to have Selenium RC running in the background in order for it to operate. A technique that I have found useful to launch it from within Perl is to execute it on a separate thread and then immediately detach it:

use threads;

my $seleniumThread = # Assumes that your Selenium RC file is in the current dir
   threads->create( sub { system "java -jar selenium-server.jar"; } );

$seleniumThread->detach;
# Avoids the main program from having to wait for the system call to end

The following question may be useful as well:

Sign up to request clarification or add additional context in comments.

Comments

2

Just a heads-up... for Selenium 2.0, you'll want to use the Selenium::Remote::Driver module instead; WWW:Selenium is for 1.0.

From the Selenium docs (http://seleniumhq.org/docs/03_webdriver.html):

Perl bindings are provided by a third party, please refer to any of their documentation on how to install / get started. There is one known Perl binding as of this writing. [with a link to https://metacpan.org/module/Selenium::Remote::Driver]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.