I am trying to run my Selenium tests against Chrome. When I initialize driver locally:
@driver = Selenium::WebDriver.for( :chrome )
Everything works fine (I already put Chrome binary on my PATH) But when I try to launch it remotely:
@driver = Selenium::WebDriver.for(:remote, :url => 'http://' + SELENIUM_HOST + port + webdriver_hub, :desired_capabilities => :chrome)
I get the following error
Selenium::WebDriver::Error::UnhandledError: The path to the chromedriver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromium/downloads/list (java.lang.IllegalStateException)
I am a bit confused there - how exactly should I set this system property? I found this code written in Java:
DesiredCapabilities caps = DesiredCapabilities.chrome();
caps.setJavascriptEnabled(true);
caps.setCapability("chrome.binary", "/path/to/where/chrome/is/installed/chrome.exe");
System.setProperty("webdriver.chrome.driver","/path/to/where/you/ve/put/chromedriver.exe");
ChromeDriver driver = new ChromeDriver(caps);
but my tests are written in Ruby. RubyBindings don't talk about this issue http://code.google.com/p/selenium/wiki/RubyBindings