2013-03-23 30 views
5

水豚,WebKit的时候定期挂起。 uservoice snippetRspec的使用与我正在使用UserVoice的应用程序页面加载与异步外部脚本=真

var uv = document.createElement('script'); 
    uv.type = 'text/javascript'; 
    uv.async = true; 
    uv.src = ...; // external call to uservoice to fetch js 
    var s = document.getElementsByTagName('script')[0]; 
    ... 

此JavaScript在所有页面上加载。运行rake spec时,运行会周期性挂起。当我删除uservoice片段时,所有测试都能顺利运行。我试过设置Capybara.javascript_driver = :webkit_debug,我看不到uservoice的回应。当我设置page.driver.browser.timeout时,我可以看到来自uservoice的0响应,并且规格将会因超时错误而失败。

其他人遇到这个问题?

+1

我有类似的东西,但被使用Ruby /豚/ RSpec的最现代的版本解决。 – adarsh 2013-05-22 17:16:11

回答

0

在等待外部脚本领导(例如谷歌分析)时,我的机器成为互联网中断我已经经历了超时错误。

我有时仍然会使用Firebug和硒驱动程序时,我试图调试水豚,因为它可以照亮看到一个实际的浏览器访问它。

相关问题