Method: Capybara::Apparition::Node#attribute

Defined in:
lib/capybara/apparition/node.rb

#attribute(name) ⇒ Object



91
92
93
94
95
96
97
# File 'lib/capybara/apparition/node.rb', line 91

def attribute(name)
  if %w[checked selected].include?(name.to_s)
    property(name)
  else
    evaluate_on('name => this.getAttribute(name)', value: name)
  end
end