Page 1 of 1

Set Value not working for combo box

Posted: Mon Mar 05, 2018 5:34 pm
by armstronghm24
I have used the set value action many times before to select a certain value from a dropdown. It is not working for a specific drop down now for some reason. The status after I run the step is successful, but no value was actually selected.

I have attached a snapshot

Re: Set Value not working for combo box

Posted: Tue Mar 06, 2018 8:25 am
by odklizec
Hi,

There seems to be nothing inside the combo you posted? It looks like disabled combo, which means there is probably nothing to set? Are you sure it's editable? Could you please take a snapshot of expanded combo?

Re: Set Value not working for combo box

Posted: Mon Mar 12, 2018 8:18 pm
by armstronghm24
I am not sure how to take a snapshot of the expanded combo box. I did make a selection manually and captured a snapshot of that.

Re: Set Value not working for combo box

Posted: Thu Mar 15, 2018 1:02 pm
by qwertzu
hi,
after clicking "Track" in Ranorex Spy, please hold F12 to pause the tracking and click to expand the conbobox. Then, release F12 key and track one of the elements of the combobox.
Please share the snapshot afterwards.

If you can't identify elements of the combobox, you could activate GDI, by adding the class name to the GDI capture list.
add_to_gdi.png
afterwards, refresh the spy and see if text elements can be identified.
regards, qwertzu

Re: Set Value not working for combo box

Posted: Tue Apr 17, 2018 4:39 pm
by armstronghm24
Attached is a snapshot of one of the elements in the dropdown.

Re: Set Value not working for combo box

Posted: Wed Apr 18, 2018 9:27 am
by odklizec
Thanks for the snapshot. So what exactly happens, if you use SetValue action? And to which attribute you have the SetValue attached to?

If SetValue does not work with ControlText or Text (for given ComboBox), then you must use mouse click to expand the combo and second click to select the item in expanded combo. In other words SetValue is most probably no solution for you. Anyway, using mouse clicks is much more proper way of setting value in combo. SetValue is just a "shortcut" and not exactly user-like approach, so it should be used with caution.