I’m trying to select multiple items from the listbox as shown in below screenshot. Requirement is to select 10 items from the listbox if items are greater than 10. If items <= 10 we have to select all.
@Rohan_Upadhye1
Starting with send hot keys is a good option for RnD the issue
In such a scenario making benefit from find children activity helped often
find all list items
And use later the found uielements for your actions
Also the count of items can be easily retrieved (= count on the find children result list)
Kindly Note: check the scope and maybe change to FIND_DESCENDENTS
Hi @ppr Thanks for your reply. The problem is Find Children activity is returning null for both the selectors below
wnd app=‘msaccess.exe’ cls=’#32770’ title=‘Select Unique Record Identifier’
ctrl name=‘Fields in table *’ role=‘list’
wnd app=‘msaccess.exe’ cls=’#32770’ title=‘Select Unique Record Identifier’
wnd ctrlid=‘1881’
Tried multiple selector combinations for the selector as all are returning null.
Hence unable to identify number of items in the list so that I can use Send Hot Keys to select the number.
Thanks,
Rohan
Hi @Rohan_Upadhye1 this happens sometimes but checking / finetuning selectors should help
Can you check:
find children:
is target selector set to list?
is filter selector set to listitems with wildcad?
ctrl name=‘*’ role=‘list item’ (with brackets as in the screenshot)
is find children setting scope ok? FIND_DESCENDENTS
Hi @ppr, Yup I tried multiple selectors and also used wildcards to finetune the same. But the one you highlighted, returns null with FindChildren activity. I’m still trying various combinations of the selector but no luck so far.
@Rohan_Upadhye1
sometimes it helped to use the recorder and do some clicks on the list. Afterwards you can inspect the result and selectors from the record.
You need some patience, I had same case where list box was realy blocking, but finaly it was solved. same to you, we will manage.