I am considering Ruby on Rails features tests. Steps to add chromedriver to selenium webdrivers initialization:
1) Download lastest chrome executable from https://sites.google.com/a/chromium.org/chromedriver/downloads
2) Declare webdriver path in rails spec helper as
(For selenium 3.x)
Selenium::WebDriver::Chrome.driver_path = "/home/jazz/Desktop/web_drivers/chromedriver"
and this should be before driver initialization like Capybara::Selenium::Driver.new(app, :browser => :chrome)
For above 3.x, just pass driver path during initialization-
Capybara::Selenium::Driver.new(app, :browser => :chrome,:driver_path => <path to chromedriver>)
All set. Load any feature spec in rails.It will open a chrome window.