lib/testcentricity_web/web_elements/ui_elements_helper.rb
# Wait until the object is no longer in a busy state, or until the specified wait time has expired. If the wait time
# is nil, then the wait time will be Capybara.default_max_wait_time.
#
# @param seconds [Integer or Float] wait time in seconds
# @example
#   login_button.wait_while_busy(10)
#
Wait until the object is no longer in a busy state, or until the specified wait time has expired. If the wait time
is nil, then the wait time will be Capybara.default_max_wait_time.
Wait until the object is no longer in a busy state or until the specified wait time has expired . If the wait time is nil then the wait time will be Capybara . default_max_wait_time .
def wait_while_busy(seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { aria_busy? }
    rescue StandardError
      if post_exception
        raise "UI #{object_ref_message} remained in busy state after #{timeout} seconds" if aria_busy?
      else
        aria_busy?
      end
    end
def wait_while_busy ( seconds = nil , post_exception = true ) timeout = seconds . nil? ? Capybara . default_max_wait_time : seconds wait = Selenium :: WebDriver :: Wait . new ( timeout : timeout ) wait . until { aria_busy? } rescue StandardError if post_exception raise "UI #{object_ref_message} remained in busy state after #{timeout} seconds" if aria_busy? else aria_busy? end end
Wait until the object is no longer in a busy state, or until the specified wait time has expired.
Wait until the object is no longer in a busy state or until the specified wait time has expired .
seconds
wait time in seconds
wait time in seconds
post_exception
example
None