def button(value)
      # Don't use ele_index because that only works on one element type.
      # Android needs to combine button and image button to match iOS.
      if value.is_a? Numeric
        index = value
        raise "#{index} is not a valid index. Must be >= 1" if index <= 0

        # 1 indexed
        return find_element :uiautomator, _button_visible_selectors(index: index)
      end

      find_element :uiautomator, _button_contains_string(value)
    end
def button(value)
      # Don't use ele_index because that only works on one element type.
      # Android needs to combine button and image button to match iOS.
      if value.is_a? Numeric
        index = value
        raise "#{index} is not a valid index. Must be >= 1" if index <= 0

        # 1 indexed
        return find_element :uiautomator, _button_visible_selectors(index: index)
      end

      find_element :uiautomator, _button_contains_string(value)
    end
backward compatibility
 Find the first button that contains value or by index.
 @param value [String, Integer] the value to exactly match.
 If int then the button at that index is returned.
 @return [BUTTON]