Created
July 20, 2011 02:44
-
-
Save dcuddeback/1094226 to your computer and use it in GitHub Desktop.
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
class Capybara::Selenium::Driver < Capybara::Driver::Base | |
def resynchronize | |
yield | |
if options[:resynchronize] | |
Capybara.timeout(options[:resynchronization_timeout], self, "failed to resynchronize, ajax request timed out") do | |
!ajaxing? | |
end | |
end | |
end | |
private | |
def ajaxing? | |
evaluate_script "$.active > 0" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment