lib/testcentricity_web/web_elements/media.rb
def wait_until_ready_state_is(value, seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { ready_state == value }
    rescue StandardError
      if post_exception
        raise "Ready state of media #{object_ref_message} failed to equal '#{value}' after #{timeout} seconds" unless get_value == value
      else
        ready_state == value
      end
    end
# Wait until the media object's readyState value equals the specified value, 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 value [Integer] value expected
# @param seconds [Integer or Float] wait time in seconds
# @example
#   media_player.wait_until_ready_state_is(4, 5)
#
Wait until the media object's readyState value equals the specified value, 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 media object ' s readyState value equals the specified value 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_ready_state_is(value, seconds = nil, post_exception = true)
      timeout = seconds.nil? ? Capybara.default_max_wait_time : seconds
      wait = Selenium::WebDriver::Wait.new(timeout: timeout)
      wait.until { ready_state == value }
    rescue StandardError
      if post_exception
        raise "Ready state of media #{object_ref_message} failed to equal '#{value}' after #{timeout} seconds" unless get_value == value
      else
        ready_state == value
      end
    end
def wait_until_ready_state_is ( value , seconds = nil , post_exception = true ) timeout = seconds . nil? ? Capybara . default_max_wait_time : seconds wait = Selenium :: WebDriver :: Wait . new ( timeout : timeout ) wait . until { ready_state == value } rescue StandardError if post_exception raise "Ready state of media #{object_ref_message} failed to equal '#{value}' after #{timeout} seconds" unless get_value == value else ready_state == value end end
Wait until the media object's readyState value equals the specified value, or until the specified wait time has expired.
Wait until the media object ' s readyState value equals the specified value or until the specified wait time has expired .
value
None
seconds
wait time in seconds
wait time in seconds
post_exception
example
None