I'm using Selenium IDE for some test and trying to use it to select an specified option from an autocomplete. My problem is, the autocomplete is built in a <ul>
and the two <li>
possibles are identical. How to click a specified li
? How to say to Selenium "click the first li
" or "click the li
with the text "apples"? I'm tried some ways that I found, but all are for other types of Selenium, and none are useful in Selenium IDE.
Thanks in advance and sorry for my bad english!
Here is the code:
<ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1003; top: 360.683px; left: 549.5px; display: block; width: 401px;">
<li class="ac_item ui-menu-item" role="menuitem">
<a class="clearfix ui-corner-all" tabindex="-1">
<span class="c1">
<b>Apple</b>
<br>
<span class="small secondary">Apples</span>
</span>
</span>
</a>
</li>
<li class="ac_item ui-menu-item" role="menuitem">
<a class="clearfix ui-corner-all" tabindex="-1">
<span class="c1">
<b>Orange</b>
<br>
<span class="small secondary">Oranges</span>
</span>
</span>
</a>
</li>
</ul>