I've written the following code for attaching my recovery scenario with scrpit during run time. It is as follows:
Dim App
Set App = CreateObject("QuickTest.Application")
App.Test.Settings.Recovery.Enabled = True
App.Test.Settings.Recovery.SetActivationMode "OnEveryStep"
App.Test.Settings.Recovery.Add "C:\QTP\Recovery\Navigation.qrs", "Navigation", 1
App.Test.Settings.Recovery.Item(1).Enabled = True
Recovery.Activate
The recovery scenario is being called, but it is not being displayed in the report that the recovery scenario has been invoked. so since it is not in report, has the recovery scenario not been invoked?? Or am I missing something in the code. something more to be added?
EDIT: Sorry, checked it again, it is not that the recovery scenario invocation is not coming in report. I just found out that the recovery scenario itself is not being invoked when error occurs. but if i go to file->setting and seeing in recovery, the recovery scenario file is added and when i run it the second time then the recovery scenario is being invoked. what can be the problem.
Thanks for your help in advance.