Sha256: 69c06ecfb89f11904dba0eea1a608a507410d4d25f45a60923e9503881916901
Contents?: true
Size: 726 Bytes
Versions: 3
Compression:
Stored size: 726 Bytes
Contents
module Watir class Element attr_reader :doc # # Store instance of Nokogiri # def doc=(html) @doc = html return if html.nil? @reset_doc_hook = ->(element) { element.reset_doc } browser.after_hooks.add(@reset_doc_hook) end def reset_doc @doc = nil browser.after_hooks.delete(@reset_doc_hook) end # # TODO - reimplement with Watir Executor when available # # Uses Nokogiri to return the text of the element. # # @return [String] # def text! @selector[:nokogiri] = true text.strip end alias_method :el_stale?, :stale? def stale? @doc.nil? && el_stale? end end # Element end # Watir
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
watigiri-0.4.0 | lib/extensions/watir/element.rb |
watigiri-0.3.2 | lib/extensions/watir/element.rb |
watigiri-0.3.1 | lib/extensions/watir/element.rb |