If script have an error 3 times than end the thread
-
Hi,
I have an infinite loop and sometimes "move mouse to element" doesn't exist. Now I use "Fail thread" option after I get this error.
But looking to do this. If bot get this error should not stop the thread, should move on to the next action and if it encounter this error again on the 3rd loop run then it should end the thread
I hope it makes sense, thanks!
-
anyone?
-
@andreiem said in If script have an error 3 times than end the thread:
anyone?
And what exactly is the question?
-
Create a variable called "counter". Than use "is element exist" to check if element exist and update "counter" variable whenever element is missing. Check counter variable in the loop, and fail thread if "counter" hit 3
-
@GaG said in If script have an error 3 times than end the thread:
Create a variable called "counter". Than use "is element exist" to check if element exist and update "counter" variable whenever element is missing. Check counter variable in the loop, and fail thread if "counter" hit 3
Got it. Thanks