Hi,
> The window size is (0, 0);
Knowing no details about your given tested application, this sounds to me like one of the usual problems caused by poor tested application design/implementation.
Scenario been guessed is like this:
-- Your test code gets a reference to the object (A) before entering the loop;
-- Test code does something on the first loop iteration. As a result of this action, object A must be modified within the tested application. But tested application neither modifies object A, nor deletes it from the DOM. Instead, tested application hides object A by setting its width/height to zero and creates a new object (A1) that is identical to initial object A. (Actually, this is a resource leak, because object A remains in DOM and consumes resources but is never used from now on.);
-- Now your test code moves to the second loop iteration and tries to reuse object A. The object still exists, thus its reference remains valid and you do not get 'Object Not Found' error, but action (like .Click() ) over this object is not possible because of its zero size and this causes the message that you see in test log.
Try to investigate tested page in the Object Browser after first loop iteration and check if width/height of initial object A are zeroed indeed. If they are, then search for the sibling object (A1) that is identical to object A but is visible (i.e. has its width/height positive). If you find such object this will mean that my guess is correct.
If my guess is correct, then you have two options:
-- Report resource leak to Development and insist on the fix. To say the truth, I do not believe in this option - who cares about resources nowadays? 😞
-- Your second option is to add additional criterion in NameMapping to make it search for the object of non-zero size and move object search inside the loop, so TestComplete will re-evaluate the reference to the object on every loop iteration and will use correct newly created object (A1, A2, ...) for the actions performed within the loop.
Hope this will help...