Skip to content
Browse files

Nicer implementation of :id selector

  • Loading branch information...
1 parent 668eeee commit d995bfba4269d09abd5a03edf97ee0af01d863e9 @jnicklas committed Aug 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/capybara/selector.rb
View
2 lib/capybara/selector.rb
@@ -44,4 +44,4 @@ def match?(locator)
Capybara::Selector.add(:xpath) { |xpath| xpath }
Capybara::Selector.add(:css) { |css| XPath::HTML.from_css(css) }
-Capybara::Selector.add(:id, :for => Symbol) { |id| XPath.generate { |x| x.descendant(:*)[x.attr(:id) == id.to_s] } }
+Capybara::Selector.add(:id, :for => Symbol) { |id| XPath.descendant(:*)[XPath.attr(:id) == id.to_s] }

0 comments on commit d995bfb

Please sign in to comment.
Something went wrong with that request. Please try again.