Class: Capybara::Driver::SafariWatir::Node
- Inherits:
-
Struct
- Object
- Struct
- Capybara::Driver::SafariWatir::Node
- Defined in:
- lib/capybara/driver/safariwatir_driver.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
Instance Method Summary collapse
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node
4 5 6 |
# File 'lib/capybara/driver/safariwatir_driver.rb', line 4 def node @node end |
Instance Method Details
#attribute(name) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/capybara/driver/safariwatir_driver.rb', line 9 def attribute(name) value = if name.to_sym == :class node.class_name else node.send(name.to_sym) end return value if value and not value.empty? end |
#click ⇒ Object
18 19 20 |
# File 'lib/capybara/driver/safariwatir_driver.rb', line 18 def click node.click end |
#tag_name ⇒ Object
22 23 24 25 26 |
# File 'lib/capybara/driver/safariwatir_driver.rb', line 22 def tag_name # FIXME: this might be the dumbest way ever of getting the tag name # there has to be something better... node.to_xml[/^\s*<([a-z0-9\-\:]+)/, 1] end |
#text ⇒ Object
5 6 7 |
# File 'lib/capybara/driver/safariwatir_driver.rb', line 5 def text node.text end |