0

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.

Tom
  • 411
  • 12
  • 28
  • I have included in the EDIT part of my question that the issue is not with the recovery scenario invocation being included in the results.....the recovery scenario itself is not being invoked, that is the problem. – Tom Jun 23 '12 at 06:05

1 Answers1

0

You can write to the report to make sure your recovery scenario is run

 Reporter.ReportEvent micDone, "Recovery Scenario", "Has been run"
Motti
  • 110,860
  • 49
  • 189
  • 262