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_visible_selectors_xpath(opts = {})
          button_index       = opts.fetch :button_index, false
          image_button_index = opts.fetch :image_button_index, false
          index = opts.fetch :index, false
          b = find_elements :xpath, "//#{BUTTON}"
          i = find_elements :xpath, "//#{IMAGE_BUTTON}"
          if index
            raise_no_such_element_if_empty(b + i)
            (b + i)[index]
          elsif button_index && image_button_index
            raise_no_such_element_if_empty(b + i)
            b_index = button_index + image_button_index
            (b + i)[b_index]
          else
            b + i
          end
        end
def _button_visible_selectors_xpath ( opts = { } ) button_index = opts . fetch :button_index , false image_button_index = opts . fetch :image_button_index , false index = opts . fetch :index , false b = find_elements :xpath , "//#{BUTTON}" i = find_elements :xpath , "//#{IMAGE_BUTTON}" if index raise_no_such_element_if_empty ( b + i ) ( b + i ) [ index ] elsif button_index && image_button_index raise_no_such_element_if_empty ( b + i ) b_index = button_index + image_button_index ( b + i ) [ b_index ] else b + i end end
Find the first button that contains value or by index.
Find the first button that contains value or by index .
None
Button
opts
<not_specific>
value
<not_specific>
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 .