lib/watir.rb in watir-6.13.0 vs lib/watir.rb in watir-6.14.0

- old
+ new

@@ -12,21 +12,20 @@ require 'watir/alert' require 'watir/js_snippets' require 'watir/container' require 'watir/cookies' require 'watir/capabilities' +require 'watir/navigation' require 'watir/browser' require 'watir/screenshot' require 'watir/after_hooks' require 'watir/logger' module Watir - @relaxed_locate = true class << self - attr_writer :relaxed_locate, :always_locate, :default_timeout, :prefer_css # # Whether or not Watir should wait for an element to be found or present # before taking an action. @@ -45,16 +44,16 @@ always_locate_message true end def always_locate_message - msg = <<-EOS.gsub("\n", " ") -Watir#always_locate is deprecated; elements are always cached and will always -be re-located if they go stale before use. -Use Element#stale? or Element#wait_until(&:stale?) if needed for flow control. - EOS - Watir.logger.warn msg, ids: [:always_locate, :deprecations] + msg = <<~ALWAYS_LOCATE.tr("\n", ' ') + Watir#always_locate is deprecated; elements are always cached and will always + be re-located if they go stale before use. + Use Element#stale? or Element#wait_until(&:stale?) if needed for flow control. + ALWAYS_LOCATE + Watir.logger.warn msg, ids: %i[always_locate deprecations] end # # Whether or not Watir should prefer CSS when translating the Watir selectors to Selenium. # @@ -63,16 +62,16 @@ prefer_css_message false end def prefer_css_message - msg = <<-EOS.gsub("\n", " ") -Watir#prefer_css is deprecated; all elements that can not be passed directly -as Selenium locators will be translated to XPath. To continue using CSS Selectors -require the watir_css gem - https://github.com/watir/watir_css - EOS - Watir.logger.warn msg, ids: [:prefer_css, :deprecations] + msg = <<~PREFER_CSS.tr("\n", ' ') + Watir#prefer_css is deprecated; all elements that can not be passed directly + as Selenium locators will be translated to XPath. To continue using CSS Selectors + require the watir_css gem - https://github.com/watir/watir_css + PREFER_CSS + Watir.logger.warn msg, ids: %i[prefer_css deprecations] end # # Default wait time for wait methods. # @@ -105,10 +104,9 @@ # def self.logger @logger ||= Watir::Logger.new end - end require 'watir/locators' require 'watir/attribute_helper' require 'watir/row_container'