Recovery Scenario: Call a function when Run Error
I know the best way for this is to check out errors and handle it.
But as a quick fix, I need to do something like this.
If i get "Run Error" dialog thrown by QTP when something goes wrong, I want to call a function.
I am unable to do this. For other dialogs, I can call a function but not for this. I have tried "Any error" option as well.
Actually, the basic idea is that if I get "Run Error" dialog, I should atleast call the clean up function and stop the script.
Thanks in advance.
Re: Recovery Scenario: Call a function when Run Er
I am not sure how you have setup your recovery scenario. But make sure that.
1. Pop up window is selected as trigger.
And i guess the dialog doesn't force qtp to lead to any error so you might need to set following.
In Test Setting -> Recovery
Select "On Every Step" in the "Activate Recovery Scenarios"
I am not sure but this might resolve your problem