Sha256: 3f132c8195e2309456aceaf46cc28e17b5c7990ad01a953cc69566755f5f868b

Contents?: true

Size: 1.32 KB

Versions: 3

Compression:

Stored size: 1.32 KB

Contents

module Appium
  module Core
    module Ios
      module Xcuitest
        module SearchContext
          # @!method ios_class_chain_find
          #   Only for XCUITest(WebDriverAgent)
          #   find_element/s can be used with a [class chain]( https://github.com/facebook/WebDriverAgent/wiki/Queries)
          #
          #   ```ruby
          #    # select the third child button of the first child window element
          #    find_elements :class_chain, 'XCUIElementTypeWindow/XCUIElementTypeButton[3]'
          #    # select all the children windows
          #    find_elements :class_chain, 'XCUIElementTypeWindow'
          #    # select the second last child of the second child window
          #    find_elements :class_chain, 'XCUIElementTypeWindow[2]/XCUIElementTypeAny[-2]'
          #    # matching predicate. <code>`</code> is the mark.
          #    find_elements :class_chain, 'XCUIElementTypeWindow[`visible = 1][`name = \"bla\"`]'
          #    # containing predicate. `$` is the mark.
          #    find_elements :class_chain, 'XCUIElementTypeWindow[$name = \"bla$$$bla\"$]'
          #   ```
          def self.extend
            ::Appium::Core::Base::SearchContext.add_finders(class_chain: '-ios class chain')
          end
        end
      end # class << self
    end # module Ios
  end # module Core
end # module Appium

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appium_lib-9.7.2 lib/appium_lib/core/ios/xcuitest/search_context.rb
appium_lib-9.7.1 lib/appium_lib/core/ios/xcuitest/search_context.rb
appium_lib-9.7.0 lib/appium_lib/core/ios/xcuitest/search_context.rb