Can I configure Poltergeist/Capybara to point at PhantomJS in a Docker container?
If I have the PhantomJS Docker container running, is it possible to use Poltergeist to run the tests against this container, using it as a remote PhantomJS server?
I didn't do yet, but I guess you can ;-)
I would do as follow:
create your "custom" phantomjs docker image (for inspiration you can see how the others do this):
- start your phantomjs with the flag --webdriver [ references ]
- expose the phantomjs http-port (so you can communicate to this container through this port)
Configure your capybara tests with the address of your container:
Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, options) end
where in the options, you can provide the :port option defined in "(1)" [ references ]
Btw I don't found yet where you can put the docker-container-ip on this configuration.