def textfield(value)
      if value.is_a? Numeric
        index = value
        raise "#{index} is not a valid index. Must be >= 1" if index <= 0

        index -= 1 # eles_by_json and _textfields_with_predicate is 0 indexed.
        result = eles_by_json(_textfield_visible)[index]
        raise _no_such_element if result.nil?

        return result
      end

      ele_by_json _textfield_contains_string value
    end
def textfield(value)
      if value.is_a? Numeric
        index = value
        raise "#{index} is not a valid index. Must be >= 1" if index <= 0

        index -= 1 # eles_by_json and _textfields_with_predicate is 0 indexed.
        result = eles_by_json(_textfield_visible)[index]
        raise _no_such_element if result.nil?

        return result
      end

      ele_by_json _textfield_contains_string value
    end
Find the first TextField that contains value or by index.
 Note: Uses XPath
 @param value [String, Integer] the text to match exactly.
 If int then the TextField at that index is returned.
 @return [TextField]