Skip to content

Instantly share code, notes, and snippets.

@dcuddeback
Created July 20, 2011 02:44
Show Gist options
  • Save dcuddeback/1094226 to your computer and use it in GitHub Desktop.
Save dcuddeback/1094226 to your computer and use it in GitHub Desktop.
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