Hi Thomas,
There is no direct way to do this. However, there are two possible approaches which can help you achieve similar functionality:
1. Use coverage profiling. This is the commonly used approach when it's necessary to detect the amount of code being executed during a test. For example, you can use our profiling tool, AQtime, to get information on how many code lines have been executed in the tested application during a test. Additional information on AQtime can be found on the following page:
http://smartbear.com/products/development-tools/performance-profiling/2. Enumerate objects in each container via the Child method (see the
Child Method and
ChildCount Property help topics for more information) and check the
MappedName property of the objects. If the property is empty, an object is not mapped and, therefore, is not likely to be clicked in your test (unless you address objects via full names or use the
FindChild method to retrieve them). This, however, is not a very reliable approach - it does not allow collecting run-time data on which objects were actually clicked, it just provides you with a rough estimate of how many objects are involved in your tests. Note that you'll also probably need to filter out objects which cannot be clicked. That is, objects which have zero width and/or height, disabled objects, invisible objects, objects having a specific WndClass (e.g. labels), etc.