class Capybara::Node::Simple

def [](name)

Returns:
  • (String) - The value of the attribute

Parameters:
  • name (Symbol) -- The attribute name to retrieve
def [](name)
  attr_name = name.to_s
  if attr_name == 'value'
    value
  elsif (tag_name == 'input') && (native[:type] == 'checkbox') && (attr_name == 'checked')
    native['checked'] == 'checked'
  else
    native[attr_name]
  end
end