Forum Discussion
Dmitry_Nikolaev
Staff
16 years agoHi Ted,
This behavior is normal. There are combo boxes that build the entire list of items only when expanding, so to be sure that the items of your combo box are recognized, we expand a combo box (when using wItemCount and wItem from script).
If this is annoying for you, you can use native properties to get access to items of your combo box. For example, you can use the ItemCount and Items native properties:
// Our sample application - Orders (Delphi):
// "C:\Users\Public\Documents\TestComplete 7 Samples\Open Apps\OrdersDemo\Delphi"
// Run exe, select "Orders | New order..." and run the following script
var combo = Sys.Process("Orders").VCLObject("OrderFrm").VCLObject("Product_ComboBox");
for (var i = 0; i < combo.ItemCount; i++) {
Log.Message(combo.Items.Strings(i));
}