Sha256: 7c2a1bfcd36961c94a4c11d4cabf890b4c7e11105ca88a6b243c53918c536156
Contents?: true
Size: 849 Bytes
Versions: 1
Compression:
Stored size: 849 Bytes
Contents
module Watir module Locators class Row class SelectorBuilder < Element::SelectorBuilder def build_wd_selector(selectors) return if selectors.values.any? { |e| e.kind_of? Regexp } selectors.delete(:tag_name) || raise("internal error: no tag_name?!") expressions = %w[./tr] unless %w[tbody tfoot thead].include?(@query_scope.tag_name.downcase) expressions += %w[./tbody/tr ./thead/tr ./tfoot/tr] end attr_expr = xpath_builder.attribute_expression(nil, selectors) unless attr_expr.empty? expressions.map! { |e| "#{e}[#{attr_expr}]" } end xpath = expressions.join(" | ") p build_wd_selector: xpath if $DEBUG [:xpath, xpath] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-6.10.1 | lib/watir/locators/row/selector_builder.rb |