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?

Answers


I didn't do yet, but I guess you can ;-)

I would do as follow:

  1. 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)
  2. 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.


Need Your Help

JAVA Eclipse "accessor" cannot be resolved to a variable

java eclipse accessor

I'm writing a program and I need to create accessor/mutator methods for the variable accountID.

How to explain access violation in RtlLeaveCriticalSection

delphi error-handling stack-trace delphi-2006

I have an application that requests data from a database triggered by a timer on a form. If there is an error (the connection to the database is lost), I sometimes I get the expected exception (