def type
      assert_exists
      value = @element.get_attribute("type").to_s

      # we return 'text' if the type is invalid
      # not sure if we really should do this
      TextFieldLocator::NON_TEXT_TYPES.include?(value) ? value : 'text'
    end
def type
      assert_exists
      value = @element.get_attribute("type").to_s

      # we return 'text' if the type is invalid
      # not sure if we really should do this
      TextFieldLocator::NON_TEXT_TYPES.include?(value) ? value : 'text'
    end
Return the type attribute of the element, or 'text' if the attribute is invalid.
 TODO: discuss.

 @return [String]