Sha256: 69506cf6c73762422bf7140a6fb2e33ad7d95b9cae76f72e441daa8690758801

Contents?: true

Size: 687 Bytes

Versions: 1

Compression:

Stored size: 687 Bytes

Contents

module Watir
  module Locators
    class TextArea
      class SelectorBuilder < Element::SelectorBuilder
        private

        def normalize_selector(how, what)
          # We need to iterate through located elements and fetch
          # attribute value using Selenium because XPath doesn't understand
          # difference between IDL vs content attribute.
          # Current Element design doesn't allow to do that in any
          # obvious way except to use regular expression.
          if how == :value && what.is_a?(String)
            [how, Regexp.new('^' + Regexp.escape(what) + '$')]
          else
            super
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-6.14.0 lib/watir/locators/text_area/selector_builder.rb