Stefan Kendall
Stefan Kendall

Reputation: 67822

Cucumber + Capybara - HTTP request path is empty in Firefox/Chrome

in env.rb, I have this:

if ENV['BROWSER']
  Capybara.default_driver = :selenium
else
  # DEFAULT: headless tests with poltergeist/PhantomJS
  Capybara.register_driver :poltergeist do |app|
    Capybara::Poltergeist::Driver.new(
      app,
      window_size: [1280, 1024] #,
    #debug:       true
    )
  end
  Capybara.default_driver = :poltergeist
  Capybara.javascript_driver = :poltergeist
end

Tests run fine in poltergeist, but if I try to run in firefox, a browser opens, nothing happens, and then the test fails with the first visit statement.

HTTP request path is empty (ArgumentError)

What's wrong with my cucumber/capybara setup? Is there something more I need to do to run tests in a real browser?

Upvotes: 2

Views: 680

Answers (1)

Stefan Kendall
Stefan Kendall

Reputation: 67822

In env.rb
ENV['no_proxy'] = '127.0.0.1'

Upvotes: 3

Related Questions