Created
January 3, 2013 05:19
-
-
Save bluerabbit/4441029 to your computer and use it in GitHub Desktop.
A Solution to AJAX errors with Capybara against a jQuery site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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