lib/watir/element_extensions.rb in commonwatir-1.7.0.rc1 vs lib/watir/element_extensions.rb in commonwatir-1.7.0

- old
+ new

@@ -21,10 +21,17 @@ end Watir::Wait.until(@timeout) { @element.present? } @element.send(m, *args, &block) end + + # Returns element id + def id + Watir::Wait.until(@timeout) { @element.present? } + @element.id + end + end # # Returns true if the element exists and is visible on the page # @@ -61,6 +68,6 @@ def wait_while_present(timeout = 60) Watir::Wait.while(timeout) { self.present? } end end # module ElementExtensions -end \ No newline at end of file +end