Sha256: b38201dd22b2fdfbfab5d414f3c178332c993a6bf45e191b853898f915b397d3

Contents?: true

Size: 1.38 KB

Versions: 8

Compression:

Stored size: 1.38 KB

Contents

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

    # 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

8 entries across 8 versions & 1 rubygems

Version Path
appium_lib-9.0.0 lib/appium_lib/android/element/text.rb
appium_lib-8.2.1 lib/appium_lib/android/element/text.rb
appium_lib-8.2.0 lib/appium_lib/android/element/text.rb
appium_lib-8.1.0 lib/appium_lib/android/element/text.rb
appium_lib-8.0.2 lib/appium_lib/android/element/text.rb
appium_lib-8.0.1 lib/appium_lib/android/element/text.rb
appium_lib-8.0.0 lib/appium_lib/android/element/text.rb
appium_lib-7.0.0 lib/appium_lib/android/element/text.rb