class Watir::Locators::Element::SelectorBuilder::XPath
Public Instance Methods
lhs_for(_building, key)
click to toggle source
@todo Get rid of building
# File lib/insite/examples/material_angular_io/watir_mods.rb, line 9 def lhs_for(_building, key) case key when :text, 'text' 'normalize-space()' when String "@#{key}" when :href # TODO: change this behaviour? 'normalize-space(@href)' when :type # type attributes can be upper case - downcase them # https://github.com/watir/watir/issues/72 XpathSupport.downcase('@type') else "@#{key.to_s.tr("_", "-")}" end end