I am trying to run Selenium tests against Chrome. When I initialize the driver locally:
@driver = Selenium::WebDriver.for( :chrome )
Everything works fine (I already installed the Chrome binary on my PATH), but when I try to run 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: path to chromedriver executable file must be set 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'm a little confused - 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 do not talk about this issue http://code.google.com/p/selenium/wiki/RubyBindings
ruby google-chrome selenium webdriver
Yulia
source share