How to select second element from <LI> list?

How can i select the second element in the LI list ?

Below is the selector of my drop down box :

<html app=‘chrome.exe’ htmlwindowname=‘localess’ title=‘XYZ’ />
<webctrl parentid=‘DevddlEnquireEmployee_ddlEmployee_DropDown’ tag=‘LI’ aaname=‘10012 ~ Prashant Telang’ />

Refer this post

after extracting as a list take the second element and replace the aaname feild in selector with the second element of the list.



getting this error


refer the post , to extract the list. give the selectors of the combi box which you have to extract


The reference post is discussing about selecting elements from Select box whereas I have to select the elements from LI tag.
My structure is like


By using UI explorer when I get the LI elements it returned me in following way :
<html app=‘chrome.exe’ htmlwindowname=‘localess’ title='XYZ />
<webctrl idx=‘1’ parentid=‘DevddlEnquireEmployee_ddlEmployee_DropDown’ tag=‘LI’ />

and so on… under UI tag…
Now, I am looking to get the IDX property which I am not getting.

1 Like

Hi @alhad_alsi,

Instead of IDX you can goto aaname

in title value give as “*” and try it.
Find children Properties change the scope to FIND_DESCENDANTS

Arivu :slight_smile:

Hi… I did the same with hot key operation. While selecting items from Ul - LI I was having some weird issue. If I select 3rd element , the selector was selecting 2nd element. As the web application has restricted the users from inspecting the DOM elements , i was not able to analyse the components used. Thus I let the selector to select the second element . I expand the list again and select the second element from the list which is the 3rd element I was looking for. This was really a frustrating issue. Anyway,…thanks for your help. :slight_smile: