title: How do I access unidentified nested menu elements using watir and firefox?
body: <p>My list is nested under two headers and I don't know how to access them via watir since the style, display is set to "none" until a "hover" event occurs. And the class isn't defined until a hover/mousveover either.</p>
  
  <pre><code>b.link(:text, /Assessments/).fire_event('onmouseover')
  </code></pre>
  
  <p>will open the initial drop-down.  I have no idea how to access the elements in the "sub-level"</p>
  
  <p>Variations on the following are rejected by watir:</p>
  
  <pre><code>b.link(:class, "sub-level").click
  b.link(:class, "sub-level").fire_event('onmouseover')
  b.link(:class, "sub-level").fire_event('hover')
  
  Watir::Exception::UnknownObjectException: unable to locate element, using {:class=&gt;"sub-level", :tag_name=&gt;"a"}
  </code></pre>
  
  <p>I've been running this through IRB for quick testing of each new line I add to my script. If this is incorrect, I would appreciate any advice.</p>
  
  <pre><code>&lt;li class="top-level"&gt;
  &lt;a class="" href="#"&gt;
  Assessments&amp;nbsp;&amp;nbsp;
  &lt;img id="lfArrowImg" style="border:0px;" src="https://test.com/top/images/global_nav_downArrow.gif"&gt;
  &lt;/a&gt;
    &lt;ul style="z-index: 1045; display: none;"&gt;
    &lt;li class="sub-level"&gt;
       &lt;a class=""&gt;
       Assessments
       &lt;div id="menugroup" class="dr-menu-node dr-menu-node-icon rich-menu-item-folder rich-menu-group-folder"&gt;&lt;/div&gt;
       &lt;/a&gt;
    &lt;ul style="z-index: 1068; display: none;"&gt;    
    &lt;li class="sub-level"&gt;
       &lt;a class="" href="http://test.com/content/aa/assessment/index.xhtml"&gt;Main&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class="sub-level"&gt;
    &lt;li class="sub-level"&gt;
  &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Thanks,
  Damien</p>