Sha256: 1194665b94ae885228948c11438451b3d41ff75a6d529ddb293f27f112ad4c2b

Contents?: true

Size: 1.07 KB

Versions: 9

Compression:

Stored size: 1.07 KB

Contents

# encoding: utf-8
module Appium::Android
  # UIATextField methods

  # Get an array of textfield texts.
  # @return [Array<String>]
  def textfields
    find_eles_attr :textfield, :text
  end

  # Get an array of textfield elements.
  # @return [Array<Textfield>]
  def e_textfields
    find_eles :textfield
  end

  # Get the first textfield element.
  # @return [Textfield]
  def first_textfield
    first_ele :textfield
  end

  # Get the last textfield element.
  # @return [Textfield]
  def last_textfield
    last_ele :textfield
  end

  # Get the first textfield that matches text.
  # @param text [String, Integer] the text to match exactly. If int then the textfield at that index is returned.
  # @return [Textfield]
  def textfield text
    return ele_index :textfield, text if text.is_a? Numeric
    find_ele_by_text :textfield, text
  end

  # Get the first textfield that includes text.
  # @param text [String] the text the textfield must include
  # @return [Textfield]
  def textfield_include text
    find_ele_by_text_include :textfield, text
  end
end # module Appium::Android

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
appium_lib-0.3.9 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.8 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.7 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.5 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.4 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.3 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.2 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.1 lib/appium_lib/android/element/textfield.rb
appium_lib-0.3.0 lib/appium_lib/android/element/textfield.rb