Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to connect to chromedriver

I use capybara & selenium test my rails project. when i execute the test script,it's has errors likes this

 Selenium::WebDriver::Error::WebDriverError:    Could not find Firefox binary (os=macosx). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::Binary.path= 

I google how to use Google Chrome as the testing browser instead of Firefox

but it occurs other errors likes

Selenium::WebDriver::Error::WebDriverError:    unable to connect to chromedriver http://127.0.0.1:9515 
like image 400
tsinghan Avatar asked Nov 14 '13 13:11

tsinghan


People also ask

Can ChromeDriver work without Chrome?

The answer is No. You have to have the chrome application inside your computer.


1 Answers

I had the exact same issue. What worked for me was using the "webdrivers" gem. Part of my gemfile looks like this:

group :development, :test do   gem 'rspec-rails'   gem 'capybara'   gem 'webdrivers' end 
like image 96
Jeremy Avatar answered Oct 18 '22 18:10

Jeremy