Skip to content

Instantly share code, notes, and snippets.

@proppy
Created August 23, 2010 17:09
Show Gist options
  • Save proppy/545882 to your computer and use it in GitHub Desktop.
Save proppy/545882 to your computer and use it in GitHub Desktop.
diff --git a/lib/watir-webdriver/container.rb b/lib/watir-webdriver/container.rb
index 691f499..fa8bf29 100644
--- a/lib/watir-webdriver/container.rb
+++ b/lib/watir-webdriver/container.rb
@@ -28,5 +28,13 @@ module Watir
raise ArgumentError, "expected Hash or (:how, 'what'), got #{selectors.inspect}"
end
+ def element(selectors)
+ return Watir::BaseElement.new self, extract_selector(selectors)
+ end
+
+ def elements(selectors)
+ return Watir::ElementCollection.new self, extract_selector(selectors)
+ end
+
end # Container
end # Watir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment