Sha256: 0bd5fa75b734d725919fb020da5f9d16bd73b5ef880920403762f81e634b15e7

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

module Watir
  module Locators
    class Button
      class Locator < Element::Locator


        private

        def using_selenium(*)
          # force watir usage
        end

        def can_convert_regexp_to_contains?
          # regexp conversion won't work with the complex xpath selector
          false
        end

        def matches_selector?(element, selector)
          if selector.key?(:value)
            copy  = selector.dup
            value = copy.delete(:value)

            super(element, copy) && (value === fetch_value(element, :value) || value === fetch_value(element, :text))
          else
            super
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-6.10.1 lib/watir/locators/button/locator.rb