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:



9
10
11
# File 'lib/appium_lib/android/espresso/helper.rb', line 9

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:



25
26
27
# File 'lib/appium_lib/android/espresso/helper.rb', line 25

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:



17
18
19
# File 'lib/appium_lib/android/espresso/helper.rb', line 17

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:



33
34
35
# File 'lib/appium_lib/android/espresso/helper.rb', line 33

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