Module: ToleranceForSeleniumSyncIssues

Defined in:
lib/spreewald_support/tolerance_for_selenium_sync_issues.rb

Defined Under Namespace

Classes: Patiently

Constant Summary collapse

RETRY_ERRORS =
%w[
  ActionController::UrlGenerationError
  Capybara::ElementNotFound
  Spec::Expectations::ExpectationNotMetError
  RSpec::Expectations::ExpectationNotMetError
  Minitest::Assertion
  Capybara::Poltergeist::ClickFailed
  Capybara::ExpectationNotMet
  Selenium::WebDriver::Error::StaleElementReferenceError
  Selenium::WebDriver::Error::NoAlertPresentError
  Selenium::WebDriver::Error::ElementNotVisibleError
  Selenium::WebDriver::Error::NoSuchFrameError
  Selenium::WebDriver::Error::NoAlertPresentError
  Selenium::WebDriver::Error::JavascriptError
  Selenium::WebDriver::Error::UnknownError
  Selenium::WebDriver::Error::NoSuchAlertError
]

Instance Method Summary collapse

Instance Method Details

#patiently(seconds = Spreewald::CapybaraWrapper.default_max_wait_time, &block) ⇒ Object



55
56
57
58
59
60
61
# File 'lib/spreewald_support/tolerance_for_selenium_sync_issues.rb', line 55

def patiently(seconds = Spreewald::CapybaraWrapper.default_max_wait_time, &block)
  if page.driver.wait?
    Patiently.new.patiently(seconds, &block)
  else
    block.call
  end
end