def text(name, locator)
      define_method("#{name}") do
        adapter.text(locator).value
      end
      define_method("#{name}=") do |text|
        adapter.text(locator).set text
      end
      define_method("clear_#{name}") do
        adapter.text(locator).clear
      end
      define_method("enter_#{name}") do |text|
        adapter.text(locator).enter text
      end
      define_method("#{name}_view") do
        adapter.text(locator).view
      end
    end
def text(name, locator)
      define_method("#{name}") do
        adapter.text(locator).value
      end
      define_method("#{name}=") do |text|
        adapter.text(locator).set text
      end
      define_method("clear_#{name}") do
        adapter.text(locator).clear
      end
      define_method("enter_#{name}") do |text|
        adapter.text(locator).enter text
      end
      define_method("#{name}_view") do
        adapter.text(locator).view
      end
    end
Generates methods to enter text into a text field, get its value
 and clear the text field

 @example
   text(:first_name, :id => 'textFieldId')
   # will generate 'first_name', 'first_name=' and 'clear_first_name' methods

 @param  [String]  the name used for the generated methods
 @param  [Hash]  locator for how the text is found