Sha256: a93ce3598fe5a1fb7db8e85958787c82400ca4f0d1bf1c4b21ac0b30e1eb89aa

Contents?: true

Size: 613 Bytes

Versions: 1

Compression:

Stored size: 613 Bytes

Contents

module WatirCss
  module Locators
    class Element
      class SelectorBuilder < Watir::Locators::Element::SelectorBuilder

        def css_builder
          @css_builder ||= CSS.new
        end

        private

        def build_wd_selector(selectors)
          return if selectors.values.any? { |e| e.is_a? Regexp }
          build_css(selectors) || build_xpath(selectors)
        end

        def build_css(selectors)
          return if selectors.values.any? { |e| e.is_a?(Symbol) || e.is_a?(TrueClass) || e.is_a?(FalseClass)}
          css_builder.build(selectors)
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir_css-0.2.0 lib/watir_css/locators/element/selector_builder.rb