Handling recovery scenario manager in qtp during runtime:
I assume that you all know how to create and use recovery scenario manager which is used for exception handling purpose.
This is very easy you can create it through resources->recovery scenario manager, you can create recovery scenario files for different scenario according to your needs. QTP is guiding in step by step manner for creating recovery file so I don’t need to explain here.
Today I am going to give you a advance qtp script which attach and enable existing recovery scenario file (.qrs format) to qtp test during runtime.
Advance QTP Script to attach and enable recovery scenario manager file to qtp test during runtime:
Set qtApp = CreateObject(“QuickTest.Application”)
qtApp.Test.Settings.Recovery.Enabled = True
qtApp.Test.Settings.Recovery.Add “C:\qtp\recovery.qrs”, “Recovery”, 1
qtApp.Test.Settings.Recovery.Item(1).Enabled = True
‘Above statement will enable recovery file for specific test.
So using above advance qtp script you can attach and enable existing recovery scenario manager file to qtp test during runtime.
If you want to know about recovery scenario manager in detail, the best qtp tutorial that I suggest is QTP help. So just go through it for more qtp information on recovery scenario manager.