Topic: Issue with capybara and selenium webdriver

I am trying to write some integration tests using cucumber - capybara and I find its pretty awesome when I'm not trying to execute javascript or use any ajax. Im on windows xp and rails 2.3.2.

I'm trying to use selenium-webdriver to run scenarios marked @javascript(setup in env.rb as: Capybara.javascript_driver = :selenium ). These tests however fail with the following message:

An existing connection was forcibly closed by the remote host. 
(Errno::ECONNRESET) 
C:/Ruby/lib/ruby/1.8/net/protocol.rb:133:in `sysread' 
C:/Ruby/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill' 
C:/Ruby/lib/ruby/1.8/timeout.rb:62:in `timeout' 
C:/Ruby/lib/ruby/1.8/timeout.rb:93:in `timeout' 
C:/Ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill' 
C:/Ruby/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' 
C:/Ruby/lib/ruby/1.8/net/protocol.rb:126:in `readline' 
C:/Ruby/lib/ruby/1.8/net/http.rb:2020:in `read_status_line' 
C:/Ruby/lib/ruby/1.8/net/http.rb:2009:in `read_new' 
C:/Ruby/lib/ruby/1.8/net/http.rb:1050:in `request' 
C:/Ruby/lib/ruby/1.8/net/http.rb:772:in `get' 
C:/Ruby/lib/ruby/1.8/net/http.rb:543:in `start' 
C:/Ruby/lib/ruby/1.8/net/http.rb:440:in `start' 
./features/step_definitions/authentication_steps.rb:124:in `/^user is 
at the login page$/' 
features\manage_authentication.feature:162:in `When user is at the 
login page' 

As recommended by jnicklas : i did change the make a change in the lib\capybara\server.rb file - changed :

def host
   "127.0.0.1" #instead of "localhost"
end

but with no luck.

If anyone has seen issues like this, please help.

Also posted this in the google group. if youd like to know whats been discussed.

Disclaimer : I am new to testing in rails.

Thanks!
Aninda

Last edited by spacefugitive (2010-10-08 02:56:55)