1

It looks like running rspec command via spring is unable to connect to local docker container with selenium running on docker-machine under osx to execute capybara tests. When invoking rspec command not via spring server - everything works fine, I can see container logs, and while running with spring - I can see nothing, and bin/rspec output stops on capybara test till I hit ctrl-c.

Here's my spec_helper.rb rspec config for docker:

Capybara.register_driver :dockerized_selenium do |app|
  Capybara::Selenium::Driver.new(app,
  :browser => :remote,
  :url => "http://192.168.99.100:4444/wd/hub")
end

Capybara.app_host = "http://10.0.2.2:3000"
Capybara.server_host = '10.0.2.2'
Capybara.server_port = '3000'

Capybara.javascript_driver = :dockerized_selenium

I'm using this docker image for selenium, with ff for browser. 192.168.99.100 - is my docker-machine's node where container is running and 10.0.2.2 - is my localhost's ip from inside of container.

Anybody see what I'm missing? thx.

sandric
  • 2,310
  • 3
  • 21
  • 26

1 Answers1

0

If you are using a proxy you may need to add a dns entry into docker_opts. not sure how your setup, but its in etc/default/docker

adambsg
  • 131
  • 2
  • 9