lib/appium_lib/android/element/button.rb in appium_lib-9.0.0 vs lib/appium_lib/android/element/button.rb in appium_lib-9.1.0

- old
+ new

@@ -1,10 +1,10 @@ # UIAButton methods module Appium module Android - Button = 'android.widget.Button' - ImageButton = 'android.widget.ImageButton' + Button = 'android.widget.Button'.freeze + ImageButton = 'android.widget.ImageButton'.freeze private # @private def _button_visible_selectors(opts = {}) @@ -43,10 +43,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 - fail "#{index} is not a valid index. Must be >= 1" if index <= 0 + raise "#{index} is not a valid index. Must be >= 1" if index <= 0 return find_element :uiautomator, _button_visible_selectors(index: index) end find_element :uiautomator, _button_contains_string(value)