def link(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'link_for', &block)
      define_method(name) do
        return platform.click_link_for identifier.clone unless block_given?
        self.send("#{name}_element").click
      end
    end
def link(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'link_for', &block)
      define_method(name) do
        return platform.click_link_for identifier.clone unless block_given?
        self.send("#{name}_element").click
      end
    end
adds three methods - one to select a link, another
 to return a PageObject::Elements::Link object representing
 the link, and another that checks the link's existence.

 @example
   link(:add_to_cart, :text => "Add to Cart")
   # will generate 'add_to_cart', 'add_to_cart_element', and 'add_to_cart?' methods

 @param [Symbol] the name used for the generated methods
 @param [Hash] identifier how we find a link.
 @param optional block to be invoked when element method is called