09-21-2009, 03:10 PM
Hey i am not sure if this helps you.
You turn on/off recovery scenarios using VB script . Generally How i do this is call the QTP script by VBscript. And VBscipt i have got code to disable or enable the recovery scenarios before running the script.
But i am not sure whether you can call functions to do this during run
You turn on/off recovery scenarios using VB script . Generally How i do this is call the QTP script by VBscript. And VBscipt i have got code to disable or enable the recovery scenarios before running the script.
But i am not sure whether you can call functions to do this during run
Code:
Dim rRecoveries
Set rRecoveries = appQTP.Test.Settings.Recovery
'Remove any default recovery scenarios
If rRecoveries.Count >0 then
rRecoveries.RemoveAll
end if
'syntax object.Add ScenarioFile, ScenarioName, [Position]
rRecoveries.add rRecoveryPath1,rRecoveryName1 ,1
rRecoveries.add rRecoveryPath2,rRecoveryName2 ,2
'After adding now enable the recovery mechanism
rRecoveries.enabled = True
'Set activation mode for recovery scenarios
rRecoveries.SetActivationMode "OnError"
'At the end, Save the test
appQtp.Test.save