Module: ToleranceForSeleniumSyncIssues

Defined in:
lib/spreewald_support/tolerance_for_selenium_sync_issues.rb

Defined Under Namespace

Classes: CapybaraWrapper, Patiently

Constant Summary collapse

RETRY_ERRORS =
%w[
  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 = CapybaraWrapper.default_max_wait_time, &block) ⇒ Object



63
64
65
66
67
68
69
# File 'lib/spreewald_support/tolerance_for_selenium_sync_issues.rb', line 63

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