Sha256: c8418dc4eeebc3a74e55e4636cddc92b274b32421c7b0564db9b67a861733e46

Contents?: true

Size: 686 Bytes

Versions: 11

Compression:

Stored size: 686 Bytes

Contents

class Capybara::Query < Capybara::Queries::BaseQuery
  # @api private
  def resolve_for(node, exact = nil)
    node.synchronize do
      children = if selector.format == :css
                   node.find_css(css)
                 elsif selector.format == :xpath
                   node.find_xpath(xpath(exact))
                 else
                   node.find_custom(selector.format, locator)
                 end.map do |child|
        if node.is_a?(Capybara::Node::Base)
          Capybara::Node::Element.new(node.session, child, node, self)
        else
          Capybara::Node::Simple.new(child)
        end
      end
      Capybara::Result.new(children, self)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
appium_capybara-1.2.1 lib/appium_capybara/ext/query_ext.rb
appium_capybara-1.2.0 lib/appium_capybara/ext/query_ext.rb
appium_capybara-1.1.0 lib/appium_capybara/ext/query_ext.rb
appium_capybara-1.0.0 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.1.2 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.1.1 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.1.0 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.0.4 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.0.3 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.0.2 lib/appium_capybara/ext/query_ext.rb
appium_capybara-0.0.1 lib/appium_capybara/ext/query_ext.rb