Sha256: dca9b5288aabafaf8a688c78f072e8643220201f96b741d1974738afa4c01b5f

Contents?: true

Size: 1.39 KB

Versions: 54

Compression:

Stored size: 1.39 KB

Contents

# TextView methods
module Appium
  module Android
    TextView = 'android.widget.TextView'.freeze

    # Find the first TextView that contains value or by index.
    # @param value [String, Integer] the value to find.
    # If int then the TextView at that index is returned.
    # @return [TextView]
    def text(value)
      return ele_index TextView, value if value.is_a? Numeric
      complex_find_contains TextView, value
    end

    # Find all TextViews containing value.
    # If value is omitted, all texts are returned.
    # @param value [String] the value to search for
    # @return [Array<TextView>]
    def texts(value = false)
      return tags TextView unless value
      complex_finds_contains TextView, value
    end

    # Find the first TextView.
    # @return [TextView]
    def first_text
      first_ele TextView
    end

    # Find the last TextView.
    # @return [TextView]
    def last_text
      last_ele TextView
    end

    # Find the first TextView that exactly matches value.
    # @param value [String] the value to match exactly
    # @return [TextView]
    def text_exact(value)
      complex_find_exact TextView, value
    end

    # Find all TextViews that exactly match value.
    # @param value [String] the value to match exactly
    # @return [Array<TextView>]
    def texts_exact(value)
      complex_finds_exact TextView, value
    end
  end # module Android
end # module Appium

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
appium_lib-9.7.5 lib/appium_lib/android/element/text.rb
appium_lib-9.7.4 lib/appium_lib/android/element/text.rb
appium_lib-9.7.3 lib/appium_lib/android/element/text.rb
appium_lib-9.7.2 lib/appium_lib/android/element/text.rb
appium_lib-9.7.1 lib/appium_lib/android/element/text.rb
appium_lib-9.7.0 lib/appium_lib/android/element/text.rb
appium_lib-9.6.1 lib/appium_lib/android/element/text.rb
appium_lib-9.6.0 lib/appium_lib/android/element/text.rb
appium_lib-9.5.0 lib/appium_lib/android/element/text.rb
appium_lib-9.4.10 lib/appium_lib/android/element/text.rb
appium_lib-9.4.9 lib/appium_lib/android/element/text.rb
appium_lib-9.4.8 lib/appium_lib/android/element/text.rb
appium_lib-9.4.7 lib/appium_lib/android/element/text.rb
appium_lib-9.4.6 lib/appium_lib/android/element/text.rb
appium_lib-9.4.5 lib/appium_lib/android/element/text.rb
appium_lib-9.4.4 lib/appium_lib/android/element/text.rb
appium_lib-9.4.3 lib/appium_lib/android/element/text.rb
appium_lib-9.4.2 lib/appium_lib/android/element/text.rb
appium_lib-9.4.1 lib/appium_lib/android/element/text.rb
appium_lib-9.4.0 lib/appium_lib/android/element/text.rb