class Selenium::WebDriver::Logger

def deprecate(old, new = nil, id: [], reference: '', &block)

Other tags:
    Yield: - appends additional message to end of provided template

Parameters:
  • reference (String) --
  • id (Symbol, Array) --
  • new (String, nil) --
  • old (String) --
def deprecate(old, new = nil, id: [], reference: '', &block)
  id = Array(id)
  return if @ignored.include?(:deprecations)
  id << :deprecations if @allowed.include?(:deprecations)
  message = "[DEPRECATION] #{old} is deprecated"
  message << if new
               ". Use #{new} instead."
             else
               ' and will be removed in a future release.'
             end
  message << " See explanation for this deprecation: #{reference}." unless reference.empty?
  discard_or_log(:warn, message, id, &block)
end