I am creating a sample script using perl for Selenium WebDriver. I have downloaded selenium-server-standalone-2.32.0.jar file and I am executing following code:
use Selenium::Remote::Driver;
use Test::More qw( no_plan ) ;
my $driver = new Selenium::Remote::Driver();
$driver->get("http://www.google.com");
$driver->find_element('q','name')->send_keys("Hello WebDriver!");
ok($driver->get_title =~ /Google/,"title matches google");
$driver->quit();
but for this code to work I have to start java server using following command:
java -jar selenium-server-standalone-2.32.0.jar
Do I have to explicitly start the server to run the script? Or, there is something else I can do like setting environment variable etc. so that I don't have to start the server like in java we don't explicitly start the server.
The documentation clearly states:
To use this module, you need to have already downloaded and started the Selenium Server (Selenium Server is a Java application).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With