title: How to emulate mouse hover with Capybara
body: <p>Basically, what I'm trying to do is click on a button that becomes visible when hovering another element (its parent).</p>
  
  <p>I have tried to use <code>trigger.('mouseover')</code> on the parent of the hidden button, but that doesn't seem to work.</p>
  
  <p>Here's a code snippet from the spec:</p>
  
  <pre><code> # label[for ... ] -&gt; the parent element
   page.execute_script("$('label[for=\"department_#{department.id}\"]').trigger(\"mouseover\")")     
   # le hidden button
   find(".actions").click     
   # some &lt;li&gt; on a list that drops down when clicking the hidden button    
   click_on("Edit department")
  </code></pre>
  
  <p>And the error ... </p>
  
  <pre><code> Failure/Error: click_on("Edit department")
   Selenium::WebDriver::Error::ElementNotVisibleError:
   Element is not currently visible and so may not be interacted with
  </code></pre>
  
  <p>I would like to know how can I make the <code>.actions</code> button visible on the page, in order to click it afterwards.</p>
  
  <p>Any help would be much appreciated.</p>