diff --git a/lib/capybara/node/simple.rb b/lib/capybara/node/simple.rb index 5049893de..a5e250698 100644 --- a/lib/capybara/node/simple.rb +++ b/lib/capybara/node/simple.rb @@ -130,9 +130,10 @@ def unsynchronized yield # simple nodes don't need to wait end - def all(*args) - query = Capybara::Query.new(*args) - elements = native.xpath(query.xpath).map do |node| + private + + def resolve_query(query, exact=nil) + elements = native.xpath(query.xpath(exact)).map do |node| self.class.new(node) end Capybara::Result.new(elements, query) diff --git a/spec/basic_node_spec.rb b/spec/basic_node_spec.rb index 8b65ba003..0ace354de 100644 --- a/spec/basic_node_spec.rb +++ b/spec/basic_node_spec.rb @@ -10,7 +10,7 @@

Yes it is

-