diff options
Diffstat (limited to 'qa/qa/page/base.rb')
-rw-r--r-- | qa/qa/page/base.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index 01ac161d26d..05e38aba77d 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -39,18 +39,9 @@ module QA false end - def retry_on_exception(max_attempts: 3, reload: false, sleep_interval: 0.0) - attempts = 0 - - begin + def retry_on_exception(max_attempts: 3, reload: false, sleep_interval: 0.5) + QA::Support::Retrier.retry_on_exception(max_attempts: max_attempts, reload_page: (reload && self), sleep_interval: sleep_interval) do yield - rescue StandardError - sleep sleep_interval - refresh if reload - attempts += 1 - - retry if attempts < max_attempts - raise end end @@ -162,6 +153,10 @@ module QA click_link text end + def click_body + find('body').click + end + def self.path raise NotImplementedError end |