【问题标题】:"unable to obtain stable firefox connection in 60 seconds" using latest selenium-webdriver使用最新的 selenium-webdriver “无法在 60 秒内获得稳定的 Firefox 连接”
【发布时间】:2011-12-15 14:20:19
【问题描述】:

我正在尝试使用 Capybara 和 shoulda 测试启用了 javascript 的 Rails 页面。我的设置是在以 Windows 7 作为主机的 VirtualBox 上运行的 Ubuntu 11.10(和 FireFox 7)。我的宝石中有红宝石。

我的测试代码如下所示:

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

(带有文本“Hi”的链接有一个简单的 jQuery click() 函数可以将“Hello”写入另一个 div;它可以实时运行)但是测试报告:

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'

我找到了 this question,但我现在已经找到了 bundle updated capybara 和 selenium-webdriver(后者到 2.9.1),但我仍然遇到同样的错误。我该如何解决?

【问题讨论】:

  • 这对我有用。不知道是因为我运气好没有出现超时,还是因为我已经运行了FF,我不知道。
  • 在我切换到 FF 9.0 后它对我有用

标签: ruby-on-rails-3 selenium capybara


【解决方案1】:

升级 selenium-webdriver 对我有用:

bundle update selenium-webdriver

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-07
    • 1970-01-01
    • 2016-08-13
    • 1970-01-01
    • 1970-01-01
    • 2013-03-26
    • 1970-01-01
    相关资源
    最近更新 更多