Sha256: 1f3c4f419f0b553ebb35d335c961ca281354cb53986602beb0d623325db49ffc

Contents?: true

Size: 1.41 KB

Versions: 54

Compression:

Stored size: 1.41 KB

Contents

module Appium
  module Android
    EditText = 'android.widget.EditText'.freeze

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

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

    # Find the first EditText.
    # @return [EditText]
    def first_textfield
      first_ele EditText
    end

    # Find the last EditText.
    # @return [EditText]
    def last_textfield
      last_ele EditText
    end

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

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

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
appium_lib-9.15.1 lib/appium_lib/android/element/textfield.rb
appium_lib-9.15.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.14.3 lib/appium_lib/android/element/textfield.rb
appium_lib-9.14.2 lib/appium_lib/android/element/textfield.rb
appium_lib-9.14.1 lib/appium_lib/android/element/textfield.rb
appium_lib-9.14.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.13.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.12.1 lib/appium_lib/android/element/textfield.rb
appium_lib-9.12.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.11.1 lib/appium_lib/android/element/textfield.rb
appium_lib-9.11.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.10.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.9.2 lib/appium_lib/android/element/textfield.rb
appium_lib-9.9.1 lib/appium_lib/android/element/textfield.rb
appium_lib-9.9.0 lib/appium_lib/android/element/textfield.rb
appium_lib-9.8.5 lib/appium_lib/android/element/textfield.rb
appium_lib-9.8.4 lib/appium_lib/android/element/textfield.rb
appium_lib-9.8.3 lib/appium_lib/android/element/textfield.rb
appium_lib-9.8.2 lib/appium_lib/android/element/textfield.rb
appium_lib-9.8.1 lib/appium_lib/android/element/textfield.rb