TestProject Forum

How do I execute the test step(s) again if it fails?

So I have a bunch of tests, which on occasion fail at the login screen

Again this is only on occasion, I would like help with creating a step/test that if login fails it goes back and tries again, only when original login fails, and skips if it was successful.

I know there are ways to do this, but I just don’t have the knowledge of how to build this test/step.

I appreciate the help in advance.


Hello @marcel.bauer
I will show you an example on this demo site
In the first step (after navigating to URL ) You need to check if you are already login
So, what I did here, I took an element that only appears if I’m already after the login and I ask Is Visible?

In this step, I will add a recovery test, in case of failure (I’m not Login yet) I will run the Login test:
If this step does not fail it means that I am already after Login and the test will continue to the next steps.
Please let me know if you can do that.

Thank you @kfir.yosef I will give this a try in the next day or so and respond back with the results. I really appreciate the help. it looks pretty straight forward, fingers crossed I don’t have any issues :smiley:


1 Like

Looks like it is working pretty good so far. Thank you so much for the help on this.