How to find Combo box selected item index?

Monday, January 22, 2018
Avatar

Hi 

I am facing difficulty in using the Combo boxes in my Windows application. The goal is to :- "Read all the options, find out the selected index and set a new index". 

The combo boxes in question have the following architecture -  ComboBox -> ListItems (un-identifiable) -> Text(the string value). 

My idea is to read all children of combo box (loop), then read children of each ListItem(loop) and then find out the selected index thus knowing which option has been selected . Later change it as per requirement.

For doing so I need to store ComboBoxs and  ListItems as different variables, how can this be done?

Also I have multiple combo boxes in same page and also in other pages how to identify each as a different, right now I am unable to identify them at all. 

Thanks in advance for yout help.

Regards

Chetan

1 Replies
Wednesday, January 24, 2018
Avatar
inflectra.jimx
re: chetan123 Monday, January 22, 2018

Hi Chetan,

I would probably suggest logging a help desk ticket for a question that is this specific, that way we can provide more personalized assistance.

In general, Rapise connects to the combo boxes and list boxes using either the UIAutomation or MSAA APIs and you can cycle through the items you see in the SPY tool. 

Regards

Jim

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Monday, January 22, 2018
  • Last Reply: Wednesday, January 24, 2018
  • Replies: 1
  • Views: 4055