lib/testcentricity_web/web_elements/image.rb
# Wait until the image is fully loaded, or until the specified wait time has expired.
#
# @param seconds [Integer or Float] wait time in seconds
# @example
#   company_logo_image.wait_until_loaded(5)
#
Wait until the image is fully loaded, or until the specified wait time has expired.
Wait until the image is fully loaded or until the specified wait time has expired .
def wait_until_loaded(seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { is_loaded? }
    rescue
      if post_exception
        raise "Image #{object_ref_message} failed to load within #{timeout} seconds" unless loaded?
      else
        loaded?
      end
    end
def wait_until_loaded ( seconds = nil , post_exception = true ) timeout = seconds . nil? ? Capybara . default_max_wait_time : seconds wait = Selenium :: WebDriver :: Wait . new ( timeout : timeout ) wait . until { is_loaded? } rescue if post_exception raise "Image #{object_ref_message} failed to load within #{timeout} seconds" unless loaded? else loaded? end end
Wait until the image is fully loaded, or until the specified wait time has expired.
Wait until the image is fully loaded or until the specified wait time has expired .
seconds
wait time in seconds
wait time in seconds
post_exception
example
None