title: Capybara - overriding an attribute on the node
body: <p>Lets say I successfully retrieve some Capybara node:</p>
  
  <pre><code>node = find("#some-element")
  </code></pre>
  
  <p>The element has some nasty attribute that I just want to ignore or override for the context of the given test:</p>
  
  <pre><code>node[:onClick] # "someInlineJSCrap(); return false;"
  </code></pre>
  
  <p>Is it possible to override an attribute on the Capybara node?  I've tried ruby hash assignment syntax with no luck;</p>
  
  <pre><code>node[:onClick] = "return true;"
  </code></pre>
  
  <p><strong>Edit (full error):</strong></p>
  
  <pre><code>undefined method `[]=' for # &lt;Capybara::Element tag="a"&gt; (NoMethodError)
  </code></pre>
  
  <p>Any help would be appreciated!</p>