5

I'm working on an application that uses uservoice. The uservoice snippet

  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];
  ...

This javascript is loaded on all pages. When running rake spec the run will periodically hang. All tests run smoothly when I remove the uservoice snippet. I've tried setting Capybara.javascript_driver = :webkit_debug and I see no response from uservoice. When I set page.driver.browser.timeout I can see a 0 response from uservoice and the specs will fail with a timeout error.

Anyone else encounter this problem?

jgdreyes
  • 169
  • 1
  • 6
  • 1
    I had something similar, but was resolved by using the most modern version of ruby/capybara/rspec. – adarsh May 22 '13 at 17:16

1 Answers1

1

I've experienced timeout errors while waiting for an external script to lead (e.g. google analytics) when my development machine becomes disconnected from the internet.

I still sometimes use firebug and selenium driver when I'm trying to debug capybara as it can be illuminating to see an actual browser go at it.

mkirk
  • 3,965
  • 1
  • 26
  • 37