Forum Discussion
Tanu,
As far as I can see, the control you are working with is TcxDBLookupComboBox by Developer Express. This is not a combo box, it's a different kind of control. Currently, it is not supported by TestComplete.
To simulate a click, you can use internal methods and properties of this object:
* Compile your C++Builder application as Open Application. This will make internal methods and properties of the application's objects accessible to TestComplete. For detailed instructions, see Open Applications in C++Builder.
* After your application becomes "Open", you can use the following code to select items from your DBLookup combo box (LookupKeyToItemIndex and ItemIndex are internal method and property of the control):
Sub Test1
' Obtain the control
Set DBLookupControl = Aliases.MyApplication1.Form1.cxDBLookupComboBox1
' Obtain the index of the desired item in the drop-down list
ItemIdx = DBLookupControl.LookupKeyToItemIndex("FRANK")
' Select the item
DBLookupControl.ItemIndex = ItemIdx
End Sub
I didn't work with DB Lookup controls much, so perhaps there is a better method or property for item selection. I'd suggest that you ask your developers or ask on Developer Express forums about this.