Sha256: 3ca7f2adb1febfaf03c6ec8b8b598b1c59ce0e3adcca6213a72d9d21efd910f6

Contents?: true

Size: 1.47 KB

Versions: 7

Compression:

Stored size: 1.47 KB

Contents

# UIAButton methods
module Appium
  module Ios
    UIAButton = 'UIAButton'

    # Find the first UIAButton that contains value or by index.
    # @param value [String, Integer] the value to exactly match.
    # If int then the UIAButton at that index is returned.
    # @return [UIAButton]
    def button(value)
      # return button at index.
      return ele_index UIAButton, value if value.is_a? Numeric
      ele_by_json_visible_contains UIAButton, value
    end

    # 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 = false)
      return tags UIAButton unless value
      eles_by_json_visible_contains UIAButton, value
    end

    # Find the first UIAButton.
    # @return [UIAButton]
    def first_button
      first_ele UIAButton
    end

    # Find the last UIAButton.
    # @return [UIAButton]
    def last_button
      last_ele UIAButton
    end

    # Find the first UIAButton that exactly matches value.
    # @param value [String] the value to match exactly
    # @return [UIAButton]
    def button_exact(value)
      ele_by_json_visible_exact UIAButton, value
    end

    # Find all UIAButtons that exactly match value.
    # @param value [String] the value to match exactly
    # @return [Array<UIAButton>]
    def buttons_exact(value)
      eles_by_json_visible_exact UIAButton, value
    end
  end # module Ios
end # module Appium

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
appium_lib-8.2.1 lib/appium_lib/ios/element/button.rb
appium_lib-8.2.0 lib/appium_lib/ios/element/button.rb
appium_lib-8.1.0 lib/appium_lib/ios/element/button.rb
appium_lib-8.0.2 lib/appium_lib/ios/element/button.rb
appium_lib-8.0.1 lib/appium_lib/ios/element/button.rb
appium_lib-8.0.0 lib/appium_lib/ios/element/button.rb
appium_lib-7.0.0 lib/appium_lib/ios/element/button.rb