lib/appium_lib/android/espresso/element/button.rb in appium_lib-15.0.0 vs lib/appium_lib/android/espresso/element/button.rb in appium_lib-15.2.0
- old
+ new
@@ -23,10 +23,10 @@
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
+ raise ArgumentError, "#{index} is not a valid index. Must be >= 1" if index <= 0
# zero index
_button_visible_selectors_xpath(index: index - 1)
end