Thanks for these examples :) it gave me alot of new ideas.
I just want to know one more thing, cause for this moment can't imagine how to do that:
Lets say that i have 3 tests that doing the same thing, diffrence is one parametr - because i dont want to make 3 diffrent .py files i decided to create a one with a loop like:
def RUNALL():
param= ['P','Np','Pm']
number=1
year=16
for p in param:
SprAddModify.SprAddModify(p,number,year)
If inside "SprAddModify" ill get an error but only for param "Np" i want my loop jump to param "Pm" and stop executing "SprAddModify" for param "Np" on first cached error
Actually if i use OnErrorEvent and inside that ill put Close and run app it will be like:
Test for param "P" success
Test for param "Np":
looking for window A
close/run app
looking for window B
close/run app
etc...
No clue how can i impose stop running the whole method SprAddModify if inside it you encountered any error.
What i want achive (if my test fail for param "Np"):
Test for param P finished with success
Test for param "Np" failed
Test for param "Pm" finished with success
I will be rlly glad for any help.