1

I've written the following code for attaching my recovery scenario with script 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
App.Test.Save

The recovery scenario is not invoked.

Is the code correct? Am I missing something?

EDIT: The recovery scenario gets added to the script (i.e., can be seen in File->Settings->Recovery) but it is not being invoked. But if we run it for the second time, it gets invoked.

Thanks for your help in advance.

1 Answer 1

3

Tom: This is expected behavior. You cannot dynamically load Recovery Scenarios and use them at runtime. Once it is associated though (manually or programmatically), the next time you run the script, it will be fired.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.