lib/appium_lib/android/element/button.rb in appium_lib-10.6.0 vs lib/appium_lib/android/element/button.rb in appium_lib-11.0.0

- old
+ new

@@ -58,12 +58,12 @@ # @return [BUTTON] def last_button # uiautomator index doesn't support last # and it's 0 indexed button_index = tags(BUTTON).length - button_index -= 1 if button_index > 0 + button_index -= 1 if button_index.positive? image_button_index = tags(IMAGE_BUTTON).length - image_button_index -= 1 if image_button_index > 0 + image_button_index -= 1 if image_button_index.positive? find_element :uiautomator, _button_visible_selectors(button_index: button_index, image_button_index: image_button_index) end