Sha256: 02412c85975454232af09e584f6fcc4fc3b15fe3148ff222e08c6addc65b3d2d
Contents?: true
Size: 833 Bytes
Versions: 38
Compression:
Stored size: 833 Bytes
Contents
module Watir module Locators class TextField class SelectorBuilder < Element::SelectorBuilder def build_wd_selector(selectors) return if selectors.values.any? { |e| e.kind_of? Regexp } selectors.delete(:tag_name) input_attr_exp = xpath_builder.attribute_expression(:input, selectors) xpath = ".//input[(not(@type) or (#{negative_type_expr}))" xpath << " and #{input_attr_exp}" unless input_attr_exp.empty? xpath << "]" p build_wd_selector: xpath if $DEBUG [:xpath, xpath] end private def negative_type_expr Watir::TextField::NON_TEXT_TYPES.map do |type| "%s!=%s" % [XpathSupport.downcase('@type'), type.inspect] end.join(' and ') end end end end end
Version data entries
38 entries across 38 versions & 1 rubygems