I have setup docker using a book tutorial, everything working fine, but when I setup selenium_chrome it is giving me error one test is passing and another is failing.

Following entry is in docker-compose.yml

    image: selenium/standalone-chrome-debug
      driver: none
      - "5900:5900"

following is my web app

    build: .
    command: /bin/sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b ''"
      - "3000:3000"
      - "4000:4000"

For Capabara setting I have following configuration in rails_helper.rb file

  config.before(:each, type: :system, js: true) do
    driven_by :selenium_chrome_in_container
    Capybara.server_host = ""
    Capybara.server_port = 4000
    Capybara.app_host = "http://web:4000"

I added file spec/support/capybara.rb with following content

Capybara.register_driver :selenium_chrome_in_container do |app|
  Capybara::Selenium::Driver.new app,
    browser: :remote,
    url: "http://selenium_chrome:4444/wd/hub",
    desired_capabilities: :chrome

Now when I ran command docker-compose exec web rspec spec/system I am getting following error.

            Unable to find chromedriver. Please download the server from

As I am using selenium/standalone-chrome-debug image and it has everything even test running but still getting this error. I can't figure out where should I look for this trouble, as too many files I check few posts where seem it is issue with this image and have to change image.

  • Could you add the log? Without it, it will be hard to answer the question. Please edit the Q&A and let us know when it can be reviewed. In the mean time the question will be closed. Could you add the logging that shows that the App is trying to connect to the chrome-driver docker container? – 030 Dec 25 '19 at 8:57