title: Locating a LI element using :text using watir-webdriver
body: <p>I am trying to locate and click on a jQuery menu element, the menu is defined as multiple UL elements containing a number of LI elements.</p>
  
  <p>Using Firefox 3.6.17 on Mac 10.5, in standard WATIR I've used;</p>
  
  <pre><code>browser.li(:text,"Options...").click
  </code></pre>
  
  <p>or</p>
  
  <pre><code>browser.div(:id,"Attributes-menu").li(:text,"Copy").click
  </code></pre>
  
  <p>to click on the menu item but using watir-webdriver (0.2.3) it is reporting the LI element cannot be found. Although I can find the containing DIV and an instance of LI by using :class.</p>
  
  <p>I've attached an example of a menu HTML below, can anyone suggest a reliable method of locating the LI item?</p>
  
  <pre><code>&lt;div class="ws-menu-container ws-context-menu ws-context-menu-hidden" style="top: 16px; left: 214px; " id="Attributes-menu"&gt;
  &lt;ul class="ws-context-menu"&gt;&lt;li class="ws-context-menu-disable"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Copy&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
  &lt;hr class="ws-context-menu-separator"&gt;
  &lt;ul class="ws-context-menu"&gt;
  &lt;li class="ws-context-menu-disable"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Add...&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
  &lt;li class="ws-context-menu-disable"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Remove...&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
  &lt;hr class="ws-context-menu-separator"&gt;
  &lt;ul class="ws-context-menu"&gt;
  &lt;li class="ws-context-menu-disable"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Clear Translation Flag&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
  &lt;li class="ws-context-menu-disable"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Copy from Master Language...&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
  &lt;li class="ws-context-menu-disable"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Push to Child Languages...&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
  &lt;hr class="ws-context-menu-separator"&gt;
  &lt;ul class="ws-context-menu"&gt;
  &lt;li class="ws-context-menu"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Options...&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
  &lt;hr class="ws-context-menu-separator"&gt;
  &lt;ul class="ws-context-menu"&gt;
  &lt;li class="ws-context-menu"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Refresh&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
  &lt;hr class="ws-context-menu-separator"&gt;
  &lt;ul class="ws-context-menu"&gt;
  &lt;li class="ws-context-menu"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Help&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
  </code></pre>