Class: Watir::Element
- Inherits:
-
Object
- Object
- Watir::Element
- Defined in:
- lib/extensions/watir/element.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
Instance Method Summary collapse
- #el_stale? ⇒ Object
- #reset_doc ⇒ Object
- #stale? ⇒ Boolean
-
#text! ⇒ String
TODO - reimplement with Watir Executor when available.
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
3 4 5 |
# File 'lib/extensions/watir/element.rb', line 3 def doc @doc end |
Instance Method Details
#el_stale? ⇒ Object
35 |
# File 'lib/extensions/watir/element.rb', line 35 alias el_stale? stale? |
#reset_doc ⇒ Object
17 18 19 20 |
# File 'lib/extensions/watir/element.rb', line 17 def reset_doc @doc = nil browser.after_hooks.delete(@reset_doc_hook) end |
#stale? ⇒ Boolean
36 37 38 |
# File 'lib/extensions/watir/element.rb', line 36 def stale? @doc.nil? && el_stale? end |
#text! ⇒ String
TODO - reimplement with Watir Executor when available
Uses Nokogiri to return the text of the element.
30 31 32 33 |
# File 'lib/extensions/watir/element.rb', line 30 def text! @selector[:nokogiri] = true text.strip end |