lib/appium_lib/android/espresso/element/button.rb
# Find the first button that contains value or by index.
# @param value [String, Integer] the value to exactly match.
# If int then the button at that index is returned.
# @return [Button]
Find the first button that contains value or by index.
Find the first button that contains value or by index .
def _button_contains_string_xpath(class_name, value)
          r_id = resource_id(value, " or @resource-id='#{value}'")
          "//#{class_name}[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}')" \
            " or contains(translate(@content-desc,'#{value.upcase}', '#{value}'), '#{value}')#{r_id}]"
        end
def _button_contains_string_xpath ( class_name , value ) r_id = resource_id ( value , " or @resource-id='#{value}'" ) "//#{class_name}[contains(translate(@text,'#{value.upcase}', '#{value}'), '#{value}')" " or contains(translate(@content-desc,'#{value.upcase}', '#{value}'), '#{value}')#{r_id}]" end
Find the first button that contains value or by index.
Find the first button that contains value or by index .
None
Button
class_name
<not_specific>
value
the value to exactly match. If int then the button at that index is returned.
the value to exactly match . If int then the button at that index is returned .