title: Ruby mechanize clicking divs
body: <p>I'm trying to search a page for divs containing a specific class and then click on them. Each of these divs containing the class have a onclick event on them.</p>
  
  <p>My current code looks like so, </p>
  
  <pre><code>home_page = agent.get('http://mysite.com')
  
  home_page.search(".//div[@class='arrow up']").each do |i| 
    i.click
  end
  </code></pre>
  
  <p>The div looks like so on the website.</p>
  
  <pre><code>&lt;div class="arrow up" onclick="$(this).uparrow(u.config.places, null, event)" role="button" aria-label="uparrow" tabindex="0"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Now there is obviously no click method for this because its a Nokogiri object, so I am here to ask is it possible for mechanize to click on a div like this? My current code can find all divs that match this class name, but I cannot figure out how to click on it.</p>