Sha256: 70fcf2c283c21681d08e9214c8c7a7aa1848ad485405a25a15e20d9d8303fe79
Contents?: true
Size: 957 Bytes
Versions: 23
Compression:
Stored size: 957 Bytes
Contents
module Watir module Locators class Button 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?!") button_attr_exp = xpath_builder.attribute_expression(:button, selectors) xpath = ".//button" xpath << "[#{button_attr_exp}]" unless button_attr_exp.empty? unless selectors[:type] == false selectors[:type] = Watir::Button::VALID_TYPES if [nil, true].include?(selectors[:type]) input_attr_exp = xpath_builder.attribute_expression(:input, selectors) xpath << " | .//input" xpath << "[#{input_attr_exp}]" end p build_wd_selector: xpath if $DEBUG [:xpath, xpath] end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems