lib/testcentricity_web/web_elements/ui_elements_helper.rb
def wait_until_gone(seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { !exists? }
    rescue StandardError
      if post_exception
        raise "UI #{object_ref_message} remained visible after #{timeout} seconds" if exists?
      else
        exists?
      end
    end
# Wait until the object no longer exists, 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
#   logout_button.wait_until_gone(5)
#
Wait until the object no longer exists, 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 no longer exists 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_until_gone(seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { !exists? }
    rescue StandardError
      if post_exception
        raise "UI #{object_ref_message} remained visible after #{timeout} seconds" if exists?
      else
        exists?
      end
    end
def wait_until_gone ( seconds = nil , post_exception = true ) timeout = seconds . nil? ? Capybara . default_max_wait_time : seconds wait = Selenium :: WebDriver :: Wait . new ( timeout : timeout ) wait . until { ! exists? } rescue StandardError if post_exception raise "UI #{object_ref_message} remained visible after #{timeout} seconds" if exists? else exists? end end
Wait until the object no longer exists, or until the specified wait time has expired.
Wait until the object no longer exists or until the specified wait time has expired .
seconds
wait time in seconds
wait time in seconds
post_exception
example
None