class Watir::Locators::Button::SelectorBuilder::XPath

Public Instance Methods

lhs_for(building, key) click to toggle source
Calls superclass method
# File lib/watir-webdriver/locators/button/selector_builder/xpath.rb, line 6
def lhs_for(building, key)
  if building == :input && key == :text
    "@value"
  else
    super
  end
end

Private Instance Methods

equal_pair(building, key, value) click to toggle source
Calls superclass method
# File lib/watir-webdriver/locators/button/selector_builder/xpath.rb, line 16
def equal_pair(building, key, value)
  if building == :button && key == :value
    # :value should look for both node text and @value attribute
    text = XpathSupport.escape(value)
    "(text()=#{text} or @value=#{text})"
  else
    super
  end
end