For long operations if, after calling like:
the error message box appears, then the associated pop-up window Recovery Scenario does not work immediately, but waits until the Exist method timeout, which slows down the test.
This scenario is by design, because in the test first is the Exist(20) and then the error is raised so the script will wait for the Exist method to finish and then the pop-up window Recovery Scenario will activate.
A way to overcome that situation is by using custom function that will overwrite the default Exist method. Below is the function:
For i = 1 To arg
If Parameter("Param1")=1 Then
The script is based on a loop that will repeat same steps depending of the argument in the Exist method. The If statement is used in order to control when the loop can stop.
This is controlled via Input parameter “Param1” and the default value of the parameter is 0, the value is changed from the function called within the Recovery Scenario – so when the recovery scenario is activated that will change the value of the parameter to 1 and this will force the Exist function to stop and continue with the test.