lib/testcentricity_web/web_elements/ui_elements_helper.rb
# Wait until the object is visible, 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
#   run_button.wait_until_visible(0.5)
#
Wait until the object is visible, 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 visible 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_visible(seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { visible? }
    rescue StandardError
      if post_exception
        raise "Could not find UI #{object_ref_message} after #{timeout} seconds" unless visible?
      else
        visible?
      end
    end
def wait_until_visible ( seconds = nil , post_exception = true ) timeout = seconds . nil? ? Capybara . default_max_wait_time : seconds wait = Selenium :: WebDriver :: Wait . new ( timeout : timeout ) wait . until { visible? } rescue StandardError if post_exception raise "Could not find UI #{object_ref_message} after #{timeout} seconds" unless visible? else visible? end end
Wait until the object is visible, or until the specified wait time has expired.
Wait until the object is visible or until the specified wait time has expired .
seconds
wait time in seconds
wait time in seconds
post_exception
example
None