Forum Discussion

prasannak's avatar
prasannak
Occasional Contributor
14 years ago

Count number of elements in QAT in the UI

How do i get TestComplete to count and assert on the number of items in the QAT (Quick Access Toolbar) in my UI application?



I have recorded a test that launches my application. Now, I would like to add some check that will count the elements in the tool bar and assert of a specified number.



Regards

Prasanna
  • Prasanna,


    You need to find a property that returns the number of toolbar items and then you can use the property checkpoint to compare this number against a predefined value.


    The property to be used depends on your toolbar control. As far as I remember, you are testing a WPF application. If it uses a standard WPF toolbar, you can use TestComplete's wButtonCount property, or the toolbar's native Items.Count property. If you use another toolbar, please see the documentation on your toolbar control or ask your developers.