# File lib/celerity/elements/button.rb, line 34 def locate # We want the :value attribute to point to the inner text for <button> elements, # and to the value attribute for <input type="button"> elements. if (val = @conditions[:value]) button_ident = Identifier.new('button') button_ident.text = val input_ident = Identifier.new('input', :type => %w[submit reset image button], :value => [val]) locator = ElementLocator.new(@container, self.class) locator.idents = [button_ident, input_ident] conditions = @conditions.dup conditions.delete(:value) @object = locator.find_by_conditions(conditions) else super end end