Method: WDA::FindElement#xpath_search

Defined in:
lib/wda_lib/find_element.rb

#xpath_search(type, attribute, value) ⇒ Array

Xpath search with element type, element attribute, element attribute value example: xpath(‘Button’, ‘name’, ‘Share’) for “//XCUIElementTypeButton

Parameters:

  • type (String)

    , attribute [String], value [String]

Returns:

  • (Array)

    contains all elements which match given variables



180
181
182
# File 'lib/wda_lib/find_element.rb', line 180

def xpath_search(type, attribute, value)
  finds :xpath, "//#{match(type)}[@#{attribute}=\"#{value}\"]"
end