I’m trying to set up Selenium Grid 2 (Ubuntu-host for hub and Perl installed and Windows-host for various browsers (Firefox, IE, Chrome, Opera)). Everything works fine, I can start short sample test against IE, FF, Opera and see how browser is open and page is loaded. Here is the test:
#!/usr/bin/perl
use Selenium::Remote::Driver;
use Test::More tests=>4;
my $driver = Selenium::Remote::Driver -> new(
'browser_name' => 'internet explorer'
);
$driver->get("http://www.google.com");
$driver->quit();
But I can’t make Chrome to work. I started Selenium-server with custom driver option on Windows-host (is this correct?) with
java -jar selenium-server-standalone-2.22.0.jar -role node -hub http://my-ubuntu-host:4444/grid/register -browser "browserName=chrome,version=19" -Dwebdriver.chrome.driver="c:\selenium-2-22-0\chromedriver.exe"
And when I attempt to run a test on Ubuntu-host with 'browser_name' => 'chrome' it only reports short error-message:
caligula@my-ubuntu-host:~/www$ ./test.pl
1..4
Could not create new session at ./test.pl line 5.
# Looks like your test exited with 255 before it could output anything.
Can somebody assist me with this? There are a lot of examples, but they are all in Java and I couldn’t accommodate any of them to Perl code.
Also I noticed that chrome driver archive was named chromedriver_win_20.0.1133.0.zip. Is it compatible with selenium server 2.22 ? I’ve tried to use selenium server 2.20 but then nothing worked at all: nor FF, nor IE.
Required parameter
'proxy' => {HASH}was not passed to the constructor. Only chrome-driver throws an exception, whereas when you call FF or IE everything is fine.There was short message in console:
creating
Selenium::Remote::Driverinstance in the following way solved the problem: