While loop keeps on throwing an error
My while loop was setup as such:
While (Object_A.VisibleOnScreen=True AND Object_B.VisibleOnScreen=False) {
Delay = 2000ms, "Reloading..."
}
Note: Object_A appears before Object_B, they do not appear at the same time
Problem: Test Complete will throw an error when Object_B was not detected
I tried just using While (Object_A.VisibleOnScreen=True) but when the property returned False, Test Complete throws an error as well.
I am on Test Complete version 11.
Attached is an SC of the While loop and the Error TC is throwing.
Hi,
You want to suppress the error when that object not exists in the screen since you are expecting object will get visible on the screen after some time.
If my understanding correct, before checking VisbleOnScreen you need to check the Exists property in-order to suppress the object not exists error in the TC logs.
Like below,
if(Object_A.Exists) { Object_A.VisbleOnScreen; }