lib/watir.rb in watir-6.11.0 vs lib/watir.rb in watir-6.12.0

- old
+ new

@@ -22,11 +22,11 @@ @relaxed_locate = true class << self - attr_writer :relaxed_locate, :always_locate, :default_timeout, :prefer_css, :locator_namespace + 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. # Defaults to true. @@ -44,15 +44,16 @@ always_locate_message true end def always_locate_message - Watir.logger.warn <<-EOS + 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] end # # Whether or not Watir should prefer CSS when translating the Watir selectors to Selenium. # @@ -61,15 +62,16 @@ prefer_css_message false end def prefer_css_message - Watir.logger.warn <<-EOS + 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] end # # Default wait time for wait methods. # @@ -77,19 +79,10 @@ def default_timeout @default_timeout ||= 30 end # - # Whether the locators should be used from a different namespace. - # Defaults to Watir::Locators. - # - - def locator_namespace - @locator_namespace ||= Watir::Locators - end - - # # @api private # def tag_to_class @tag_to_class ||= {} @@ -154,7 +147,5 @@ require 'watir/elements/text_field' require 'watir/elements/input' require 'watir/radio_set' require 'watir/aliases' - -Watir.tag_to_class.freeze