lib/appium_lib/ios/element/button.rb in appium_lib-1.0.0 vs lib/appium_lib/ios/element/button.rb in appium_lib-2.0.0

- old
+ new

@@ -11,14 +11,16 @@ # return button at index. return ele_index UIAButton, value if value.is_a? Numeric xpath_visible_contains UIAButton, value end - # Find all UIAButtons containing value + # Find all UIAButtons containing value. + # If value is omitted, all UIAButtons are returned. # @param value [String] the value to search for # @return [Array<UIAButton>] - def buttons value + def buttons value=false + return tags UIAButton unless value xpaths_visible_contains UIAButton, value end # Find the first UIAButton. # @return [UIAButton] @@ -42,14 +44,8 @@ # Find all UIAButtons that exactly match value. # @param value [String] the value to match exactly # @return [Array<UIAButton>] def buttons_exact value xpaths_visible_exact UIAButton, value - end - - # Find all UIAButtons. - # @return [Array<UIAButton>] - def e_buttons - tags UIAButton end end # module Ios end # module Appium \ No newline at end of file