Okay, I’m running into a strange error with a cucumber scenario on a Rails 2 app.
We’re running our Cucumber suite under Capybara Webkit. This, for the most part is working fine, but I have a test that’s failing during an ajax transaction because it can’t see the element that should be appearing on the page.
I initially though this was a race condition and upped the max timeout, but no matter how long we wait around, the element is not found.
So I wanted to see it in action, so I tried to switch to Selenium so I could watch the whole test end-to-end.
However, whenever I try to run it through selenium, it fails right out of the gate during the first setup step with the error:
Given I am logged in # features/step_definitions/users/authentication_steps.rb:5
HTTP request path is empty (ArgumentError)
/home/dvg/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1860:in `initialize'
/home/dvg/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:2093:in `initialize'
./features/support/assumption.rb:48:in `login'
./features/step_definitions/users/authentication_steps.rb:7:in `/^I am logged in$/'
features/requests/user_requests_a_thing.feature:4:in `Given I am logged in'
I have messed with every setting I can think of to try and get it working.
I have tried:
- Switching from Firefox to ChromeDriver
- Defining App Host
- Defining a NO_PROXY environment vriable in case the proxy server was getting in the way (which I think is something Selenium Webdriver looks at)
- Refactoring to use path_helpers instead of visit “/login” style steps
- Updating the bundle
Special Considerations:
- We are a rails 2.3 app that just converted from Ruby 1.8.7 to 1.9.3
- We are using the latest Cucumber/Capybara
It was the no proxy variable, but it needed to be