Sha256: 8d6e35751f5ffa8288f42fe2a044ef09030f7087ef26a7a892778aad2e657634

Contents?: true

Size: 1.79 KB

Versions: 29

Compression:

Stored size: 1.79 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)
          #
          # @example
          #
          #   # 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.
          #   # Require appium-xcuitest-driver 2.54.0+
          #   # PR: https://github.com/facebook/WebDriverAgent/pull/707/files
          #   find_elements :class_chain, 'XCUIElementTypeWindow[$name = \"bla$$$bla\"$]'
          #   e = find_element :class_chain, "**/XCUIElementTypeWindow[$name == 'Buttons'$]"
          #   e.tag_name #=> "XCUIElementTypeWindow"
          #   e = find_element :class_chain, "**/XCUIElementTypeStaticText[$name == 'Buttons'$]"
          #   e.tag_name #=> "XCUIElementTypeStaticText"
          #
          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

29 entries across 29 versions & 2 rubygems

Version Path
appium_lib_core-1.5.1 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.5.0 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.4.2 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.4.1 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.4.0 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.8 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.7 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.6 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.5 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.4 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.3 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.2 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.1 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.3.0 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.2.7 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.2.6 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.2.5 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.2.4 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.2.3 lib/appium_lib_core/ios/xcuitest/search_context.rb
appium_lib_core-1.2.2 lib/appium_lib_core/ios/xcuitest/search_context.rb