Skip to content

Instantly share code, notes, and snippets.

@bluerabbit
Created January 3, 2013 05:19
Show Gist options
  • Save bluerabbit/4441029 to your computer and use it in GitHub Desktop.
Save bluerabbit/4441029 to your computer and use it in GitHub Desktop.
A Solution to AJAX errors with Capybara against a jQuery site
def wait_for_ajax(timeout = Capybara.default_wait_time)
page.wait_until(timeout) do
page.evaluate_script 'jQuery.active == 0'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment