2
votes

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?

1
What version of firefox and selenium-webdriver are you using? - Thomas Walpole
also - where is that error being thrown from? - Thomas Walpole
@TomWalpole FF 40.0.3. Any visit or page command of any kind throws the error. - Stefan Kendall
and which version of selenium-webdriver - Thomas Walpole
I would try updating to selenium-webdriver 2.48.1 since 2.48.0 had some issues -- otherwise unless you're using a proxy or something to connect to firefox it should be working - Thomas Walpole

1 Answers

3
votes

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