Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"unable to obtain stable firefox connection in 60 seconds" using latest selenium-webdriver

I'm trying to test a javascript-enabled Rails page using Capybara and shoulda. My setup is Ubuntu 11.10 (and FireFox 7) running on VirtualBox with Windows 7 as host. I have therubyracer in my gems.

My test code looks like this:

context "with javascript" do
  setup do
    Capybara.current_driver = :selenium
  end

  should "handle javascript" do      
    visit '/'
    click_link 'Hi'
    assert page.has_content? "Hello"
  end
end

(where the link with text "Hi" has a simple jQuery click() function to write "Hello" into another div; it works live) but the test reports:

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)
Exception `Selenium::WebDriver::Error::WebDriverError' at /usr/local/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.9.1/lib/selenium/webdriver/firefox/launcher.rb:77:in `connect_until_stable'

I found this question, but I've now bundle updated both capybara and selenium-webdriver (the latter to 2.9.1) and I still get the same error. How can I fix it?

like image 960
Chowlett Avatar asked Oct 26 '11 09:10

Chowlett


1 Answers

Upgrading selenium-webdriver worked for me:

bundle update selenium-webdriver
like image 139
Zubin Avatar answered Oct 21 '22 07:10

Zubin