Sha256: e32b442f085f5bd57253fa66ec891f8b59555b6a6084c5b7a69e05e1ed4b08d7
Contents?: true
Size: 701 Bytes
Versions: 10
Compression:
Stored size: 701 Bytes
Contents
# coding: UTF-8 module ToleranceForSeleniumSyncIssues # This is similiar but not entirely the same as Capybara::Node::Base#wait_until or Capybara::Session#wait_until def patiently(seconds=Capybara.default_wait_time, &block) if page.driver.wait? start_time = Time.now begin block.call rescue => e raise e if (Time.now - start_time) >= seconds sleep(0.05) raise Capybara::FrozenInTime, "time appears to be frozen, Capybara does not work with libraries which freeze time, consider using time travelling instead" if Time.now == start_time retry end else block.call end end end World(ToleranceForSeleniumSyncIssues)
Version data entries
10 entries across 10 versions & 1 rubygems