def label(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'label_for', &block)
      define_method(name) do
        return platform.label_text_for identifier.clone unless block_given?
        self.send("#{name}_element").text
      end
    end
def label(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'label_for', &block)
      define_method(name) do
        return platform.label_text_for identifier.clone unless block_given?
        self.send("#{name}_element").text
      end
    end
def label ( name , identifier = { :index => 0 } , & block ) standard_methods ( name , identifier , 'label_for' , block ) define_method ( name ) do return platform . label_text_for identifier . clone unless block_given? self . send ( "#{name}_element" ) . text end end
adds three methods - one to retrieve the text from a label,
 another to return the label element, and another to check the label's existence.

 @example
   label(:message, :id => 'message')
   # will generate 'message', 'message_element', and 'message?' methods

 @param [Symbol] the name used for the generated methods
 @param [Hash] identifier how we find a label.
 @param optional block to be invoked when element method is called
adds three methods - one to retrieve the text from a label another to return the label element and another to check the label s existence .