Sha256: 7a1cb6788f07ea7e2ee421d75a4aaa46e4d3a8cac8995fccd391f1a31e2dc140
Contents?: true
Size: 961 Bytes
Versions: 30
Compression:
Stored size: 961 Bytes
Contents
module Watir module Locators class TextField class Locator < Element::Locator def locate_all find_all_by_multiple end private def wd_find_first_by(how, what) how, what = selector_builder.build_wd_selector(how => what) if how == :tag_name super end def matches_selector?(element, rx_selector) rx_selector = rx_selector.dup tag_name = element.tag_name.downcase [:text, :value, :label].each do |key| if rx_selector.key?(key) correct_key = tag_name == 'input' ? :value : :text rx_selector[correct_key] = rx_selector.delete(key) end end super end def by_id element = super if element && !Watir::TextField::NON_TEXT_TYPES.include?(element.attribute(:type)) element end end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems