aivaturi/Selenium-Remote-Driver — Issue #23: Unable to run simple example
Author: Higashi
Created: 2012-01-05 12:09:16+00:00
State: open

I'm looking into moving from selenium RC to webdriver using perl. So this is my first attempt at running Selenium::Remote::Driver

As my server I'm using selenium-server-standalone-2.16.0.jar

Selenium::Remover::Driver is the latest version from CPAN.

My browser is Firefox 8.0

I am trying to run the simple example in the documentation:

use Selenium::Remote::Driver;
my $driver = new Selenium::Remote::Driver;
$driver->get('http://www.google.com');
print $driver->get_title();
$driver->quit();

The browser window appears, however it hangs while trying to connect to google and I get the log:

11:23:42.028 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@643ae941 at URL: /status)
11:23:42.064 INFO - Done: /status
11:23:42.129 INFO - Executing: [new session: {platform=ANY, javascriptEnabled=true, browserName=firefox, version=}] at URL: /session)
11:23:50.263 INFO - Done: /session
11:23:50.272 INFO - Executing: org.openqa.selenium.remote.server.handler.GetSessionCapabilities@31554233 at URL: /session/1325762586925)
11:23:50.273 INFO - Done: /session/1325762586925
11:23:50.284 INFO - Executing: [get: http://www.google.com] at URL: /session/1325762586925/url)
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "read timeout at /usr...") at /usr/local/share/perl/5.12.4/Selenium/Remote/RemoteConnection.pm line 77.
11:26:50.389 INFO - Executing: [delete session: 1325762586925] at URL: /session/1325762586925)
(in cleanup) malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "read timeout at /usr...") at /usr/local/share/perl/5.12.4/Selenium/Remote/RemoteConnection.pm line 77.

I can do the equivalent successfully using a Test::WWW::Selenium script, so I know that the selenium server and access to google is OK.

Any ideas as to what the problem might be?