cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong ComboBox item count given by object spy

Jaspreet88
Occasional Visitor

Wrong ComboBox item count given by object spy

I am trying to find item combo box item count through test complete object spy and it’s giving 43 as count but actually ComboBox has only 32 items . Tried through script code via .net there also it’s showinf 43 . And object spy also shows 43. But if I click that combo box and count the items it’s 32. What can be the issue here ? It’s desktop application I am testing here. Please help asap.
3 REPLIES 3
Marsha_R
Community Hero

Re: Wrong ComboBox item count given by object spy

You should be able to drill down in the mapping and see the individual items.  There's probably something like some blank items that are in the drop down but not displayed.

Vallalarasu_P
Frequent Contributor

Re: Wrong ComboBox item count given by object spy

Try using FindallChildren and read the Name or Values of the dropdown exist, Which will give a better understanding of the development structure.

 

Function ReadItemsCombobox

set calObj=Sys.YourDesktopApp.
PropArray = Array(“Class”)
ValuesArray = Array(“combobox”)
ComboListItems =calObj.findAll(PropArray,ValuesArray,30,true)
 Log.Message(“Count :” & UBound(ComboListItems ))
for each xin ComboListItems
Log.Message(x.Name)
next

End Function

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
tristaanogre
Community Hero

Re: Wrong ComboBox item count given by object spy

A combo box, sometimes, may have items that are not visible on screen due to, perhaps, filters in place based upon other data.  The 43 is probably the full count but the 32 is what is currently available at the moment.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements