Ricky
2010-Feb-25 19:45 UTC
SocketError: getaddrinfo: Name or service not known --> error while running test case
Hi all, I am getting the below error when I try to run my test case. I have already started selenium RC server (port:4444).. Also I have specified " 127.0.0.1 localhost " in /etc/hosts ... :ruby test1.rb Loaded suite test1 Started E Finished in 0.022698 seconds. 1) Error: testfestool(Test1): SocketError: getaddrinfo: Name or service not known /usr/lib/ruby/1.8/net/http.rb:560:in `initialize'' /usr/lib/ruby/1.8/net/http.rb:560:in `open'' /usr/lib/ruby/1.8/net/http.rb:560:in `connect'' /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'' /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'' /usr/lib/ruby/1.8/net/http.rb:560:in `connect'' /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'' /usr/lib/ruby/1.8/net/http.rb:542:in `start'' /usr/lib/ruby/1.8/net/http.rb:1035:in `request'' /usr/lib/ruby/1.8/net/http.rb:845:in `post'' /home/arawat/.gem/ruby/1.8/gems/selenium-client-1.2.18/lib/ selenium/client/protocol.rb:89:in `http_post'' /home/arawat/.gem/ruby/1.8/gems/selenium-client-1.2.18/lib/ selenium/client/protocol.rb:12:in `remote_control_command'' /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'' /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'' /home/arawat/.gem/ruby/1.8/gems/selenium-client-1.2.18/lib/ selenium/client/protocol.rb:11:in `remote_control_command'' /home/arawat/.gem/ruby/1.8/gems/selenium-client-1.2.18/lib/ selenium/client/protocol.rb:19:in `string_command'' /home/arawat/.gem/ruby/1.8/gems/selenium-client-1.2.18/lib/ selenium/client/base.rb:85:in `start_new_browser_session'' /home/arawat/.gem/ruby/1.8/gems/selenium-client-1.2.18/lib/ selenium/client/base.rb:99:in `start'' test1.rb:27:in `setup'' The code am using for connection is: require "rubygems" require "selenium/client" require "test/unit" class Test1 < Test::Unit::TestCase def setup @verification_errors = [] @selenium = Selenium::Client::Driver.new \ :host => "http://127.0.0.1", :port => 4444, :browser => "*firefox", :url => "http://www.google.com/", :timeout_in_second =>60 #start browser session @selenium.start @selenium.set_context("test1") end def teardown @selenium.stop assert_equal [], @verification_errors end Let me know if you need any other additional information. Thanks for your help in advance :) .. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.