title: Trying to click a link in a dropdown which can only be accessed by hovering over an element
body: <p>I'm trying to click on an element (link) in a drop down which only appears when hovering over an element. 
  Unfortunately I cannot provide a link to the site where issue is occurring, as functionality is not available on our Live site yet. See below for the HTML code for which this issue concerns:</p>
  
  <pre><code>&lt;li class="sub-menu"&gt;
    &lt;span class="label"&gt;Signed in as&lt;/span&gt;
    &lt;span class="val"&gt;Xkeek Javed Wezacur&lt;/span&gt;
    &lt;a href="#user-actions"&gt;Menu&lt;/a&gt;
    &lt;ul id="user-actions"&gt;
      &lt;li&gt;
      &lt;li&gt;
      &lt;li&gt;
        &lt;a href="/sign_out"&gt;Sign out&lt;/a&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Now I am trying to access and click code:    </p>
  
  <pre><code>&lt;a&gt;href="/sign_out"&gt;Sign out&lt;/a&gt;
  </code></pre>
  
  <p>I have tried various solutions, but get errors everytime. See below for what I have tried and the errors I have received:</p>
  
  <pre><code>@browser.li(:class, 'sub-menu').ul(:id, 'user-actions').link(:text, 'Sign out').click  
  </code></pre>
  
  <p>Element cannot be scrolled into view:<a href="https://xxxuat.com/sign_out" rel="nofollow">https://xxxuat.com/sign_out</a> (Selenium::WebDriver::Error::MoveTargetOutOfBoundsError)</p>
  
  <pre><code>@browser.ul(:id, 'user-actions').link(:text, 'Sign out').click
  </code></pre>
  
  <p>Element cannot be scrolled into view:<a href="https://xxxuat.com/sign_out" rel="nofollow">https://xxxuat.com/sign_out</a> (Selenium::WebDriver::Error::MoveTargetOutOfBoundsError)</p>
  
  <pre><code>@browser.link(:text, 'Menu').link(:text, 'Sign out').click
  </code></pre>
  
  <p>unable to locate element, using {:text=>"Sign out", :tag_name=>"a"} (Watir::Exception::UnknownObjectException)</p>
  
  <pre><code>@browser.link(:text, 'Sign out').click
  </code></pre>
  
  <p>Element cannot be scrolled into view:<a href="https://xxxuat.com/sign_out" rel="nofollow">https://xxxuat.com/sign_out</a> (Selenium::WebDriver::Error::MoveTargetOutOfBoundsError)</p>
  
  <p>I have tried to find some answers using stackoverflow and Google groups, if I can be pointed in the right direction I would be very grateful. Thank you guys.</p>
  
  <p>Environment: Mac OSX 10.7.5, Firefox 19.0.2, Ruby 1.9.3p194, watir-webdriver 0.6.2</p>
  
  <p>I just tried:</p>
  
  <pre><code>@browser.link(:text, 'Menu').fire_event('onmouseover'),      
  @browser.li(:class, 'sub-menu', :text, 'Sign out').link.click   
  </code></pre>
  
  <p>The error I got was:<br>
      expected Hash or (:how, 'what'), got [:class, "sub-menu", :text, "Sign out"]     (ArgumentError).<br>
  Now I am confused</p>