def wait_until(depr_timeout = nil, depr_message = nil, timeout: nil, message: nil, interval: nil, **opt, &blk)
      if depr_message || depr_timeout
        Watir.logger.deprecate 'Using arguments for #wait_until', 'keywords', ids: [:timeout_arguments]
        timeout = depr_timeout
        message = depr_message
      end
      message ||= proc { |obj| "waiting for true condition on #{obj.inspect}" }

      # TODO: Consider throwing argument error for mixing block & options
      proc = create_proc(opt, &blk)

      Wait.until(timeout: timeout, message: message, interval: interval, object: self, &proc)

      self
    end
def wait_until(depr_timeout = nil, depr_message = nil, timeout: nil, message: nil, interval: nil, **opt, &blk)
      if depr_message || depr_timeout
        Watir.logger.deprecate 'Using arguments for #wait_until', 'keywords', ids: [:timeout_arguments]
        timeout = depr_timeout
        message = depr_message
      end
      message ||= proc { |obj| "waiting for true condition on #{obj.inspect}" }

      # TODO: Consider throwing argument error for mixing block & options
      proc = create_proc(opt, &blk)

      Wait.until(timeout: timeout, message: message, interval: interval, object: self, &proc)

      self
    end
Waits until the condition is true.

 @example
   browser.wait_until(timeout: 2) do |browser|
     browser.windows.size == 1
   end

 @example
   browser.text_field(name: "new_user_first_name").wait_until(&:present?).click
   browser.text_field(name: "new_user_first_name").wait_until(message: 'foo') { |field| field.present? }
   browser.text_field(name: "new_user_first_name").wait_until(timeout: 60, &:present?)
   browser.text_field(name: "new_user_first_name").wait_until(timeout: 60, name: 'new_user_first_name')

 @param [Integer] timeout seconds to wait before timing out
 @param [String] message error message for when times out