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
selenium_chrome: image: selenium/standalone-chrome-debug logging: driver: none ports: - "5900:5900"
following is my web app
web: build: . command: /bin/sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'" ports: - "3000:3000" - "4000:4000"
For Capabara setting I have following configuration in
config.before(:each, type: :system, js: true) do driven_by :selenium_chrome_in_container Capybara.server_host = "0.0.0.0" Capybara.server_port = 4000 Capybara.app_host = "http://web:4000" end
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 end
Now when I ran command
docker-compose exec web rspec spec/system I am getting following error.
Selenium::WebDriver::Error::WebDriverError: 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.