Last active
June 10, 2016 01:07
-
-
Save nowk/4747980 to your computer and use it in GitHub Desktop.
Capybara waits for AJAX (angular & jquery)
This file contains hidden or 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 = 5) #Timeout in seconds | |
page.wait_until(timeout) do | |
page.evaluate_script "angular.element.active == 0 && jQuery.active == 0" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
any solutions to waiting for angularJS ajax?