def button(value)
      # return button at index.
      return ele_index button_class, value if value.is_a? Numeric

      ele_by_json_visible_contains button_class, value
    end
def button(value)
      # return button at index.
      return ele_index button_class, value if value.is_a? Numeric

      ele_by_json_visible_contains button_class, value
    end
Find the first UIAButton|XCUIElementTypeButton that contains value or by index.
 @param value [String, Integer] the value to exactly match.
 If int then the UIAButton|XCUIElementTypeButton at that index is returned.
 @return [UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]