Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.7k points)

I'm having some trouble getting Chrome to work with RSpec/Capybara on Ubuntu 13.10 64-bit. By default it launches Firefox - we tried to change this a variety of ways, including:

/home/.../xxx_spec.rb:8:in `<top (required)>': undefined local variable or method `“chromedriver”' for main:Object (NameError)

We also tried:

require 'capybara/rspec'

require 'rspec'

require 'selenium-webdriver'

Capybara.register_driver :selenium do |app|, :browser => :chrome)


/home/ubuntu/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/chrome/service.rb:50:in `start': unable to connect to chromedriver (Selenium::WebDriver::Error::WebDriverError)

Is there another step required to use Chrome? I'm new with Selenium.

1 Answer

0 votes
by (62.9k points)

This is what you can try:

Download the latest chrome driver version using this link:

Then insert in spec_helper.rb

 Capybara.register_driver :chrome do |app|, :browser => :chrome)


Capybara.javascript_driver = :chrome

This should work for you!

Browse Categories