I've got a select control that when dropped open presents a list of items to pick. When you pick an item, it sets the select control to this item and then pops up a message warning you about something you need to do in the program. When this control is popped open, I can spy on it using CTRL+WIN and see that it's a container with listitems. However, when focus on the app is lost, the popup closes and I cannot do much in Spy since it's lost the controls and I cannot save a snapshot as a result.
In my code, I click the select an iterate through the items and set the item's select value to true (because trying to click it doesn't actually work). Works fine. However, the message box does not appear. I've run into this in the past with my old automation tool and it was because an event was not being fired.
Since in my code I'm not actually "clicking" the option, I figure this is the reason it is not firing the event.
So any thoughts on what is happening and how to resolve it?
Here's the code I'm using:
MySelectTag = Adapter.Create(Of Ranorex.SelectTag)(MyControl.Element) MySelectTag.Click() 'open the popup For Each MyOption In MySelectTag.Options 'Debug.Print(MyOption.InnerText) If MyOption.InnerText = sValue Then MyOption.Selected = True MySelectTag.Click() 'close the pop up bFound = True Exit For End If NextAnd here is what I see in Spy (as mentione, I cannot save a snapshot since on focus loss, the popup disappears)
Thanks,
Aracknid.