def ele_index(class_name, index)
      results = tags(class_name)
      if index == 'last()'
        index = results.length
        index -= 1 if index >= 0
      else
        raise 'Index must be >= 1' unless index >= 1

        index -= 1 if index >= 1
      end

      # uiautomator has issues with index/instance so calculate the index
      # client side.
      results[index]
    end
def ele_index(class_name, index)
      results = tags(class_name)
      if index == 'last()'
        index = results.length
        index -= 1 if index >= 0
      else
        raise 'Index must be >= 1' unless index >= 1

        index -= 1 if index >= 1
      end

      # uiautomator has issues with index/instance so calculate the index
      # client side.
      results[index]
    end
Find the element of type class_name at matching index.
 @param class_name [String] the class name to find
 @param index [Integer] the index
 @return [Element] the found element of type class_name