Micro Focus QTP (UFT) Forums
Exception Handling thorugh Descritpive Programming. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Exception Handling thorugh Descritpive Programming. (/Thread-Exception-Handling-thorugh-Descritpive-Programming)

Pages: 1 2


RE: Exception Handling thorugh Descritpive Programming. - prabhu656656 - 08-27-2009

Thanks Basanth and Saket..you guys have been very helpful althroughout in every query I put forward.

Let me go through it properly and find out a way to implement the same.


RE: Exception Handling thorugh Descritpive Programming. - shambu.pujar - 09-21-2009

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

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