Module: Appium::Android::Espresso::Helper

Defined in:
lib/appium_lib/android/espresso/helper.rb

Instance Method Summary collapse

Instance Method Details

#complex_find_contains(class_name, value) ⇒ Element

Find the first element that contains value

Parameters:

  • class_name (String)

    the class name for the element

  • value (String)

    the value to search for

Returns:



23
24
25
# File 'lib/appium_lib/android/espresso/helper.rb', line 23

def complex_find_contains(class_name, value)
  find_element :xpath, string_visible_contains_xpath(class_name, value)
end

#complex_find_exact(class_name, value) ⇒ Element

Find the first element exactly matching value

Parameters:

  • class_name (String)

    the class name for the element

  • value (String)

    the value to search for

Returns:



39
40
41
# File 'lib/appium_lib/android/espresso/helper.rb', line 39

def complex_find_exact(class_name, value)
  find_element :xpath, string_visible_exact_xpath(class_name, value)
end

#complex_finds_contains(class_name, value) ⇒ Array<Element>

Find all elements containing value

Parameters:

  • class_name (String)

    the class name for the element

  • value (String)

    the value to search for

Returns:



31
32
33
# File 'lib/appium_lib/android/espresso/helper.rb', line 31

def complex_finds_contains(class_name, value)
  find_elements :xpath, string_visible_contains_xpath(class_name, value)
end

#complex_finds_exact(class_name, value) ⇒ Element

Find all elements exactly matching value

Parameters:

  • class_name (String)

    the class name for the element

  • value (String)

    the value to search for

Returns:



47
48
49
# File 'lib/appium_lib/android/espresso/helper.rb', line 47

def complex_finds_exact(class_name, value)
  find_elements :xpath, string_visible_exact_xpath(class_name, value)
end