03-24-2017, 09:08 PM
(This post was last modified: 03-24-2017, 11:18 PM by UrmilaSaha.)
Hello There , I have created the recovery Scenario. At UFT Setting , Setting-->Recovery--> Add recovery Scenario I have add all the Recovery Scenario And Its working fine when I am Executing Locally. But According to my frame work its not working when I am executing from ALM. So I am trying to Load Recovery Scenario at Runtime. I am getting below error ""TestRetailing" is not a valid recovery Scenario"
Below my Code:
Function LoadRecovery()
Set qtApp = CreateObject("QuickTest.Application")
Set qtTestRecovery = qtApp.Test.Settings.Recovery
qtTestRecovery.Add "C:\TEST\Project\RecoveryScenario\Test Retailing note.qrs", "TestRetailing" , 1
qtTestRecovery.Add "C:\TEST\Project\RecoveryScenario\Test Note.qrs", "TestNote" , 2
For intIndex = 1 To qtTestRecovery.Count
qtTestRecovery.Item(intIndex).Enabled = True
Next
qtTestRecovery.Enabled = true
qtTestRecovery.SetActivationMode "OnError"
Set qtApp = Nothing
Set qtTestRecovery = Nothing
End Function
Below my Code:
Function LoadRecovery()
Set qtApp = CreateObject("QuickTest.Application")
Set qtTestRecovery = qtApp.Test.Settings.Recovery
qtTestRecovery.Add "C:\TEST\Project\RecoveryScenario\Test Retailing note.qrs", "TestRetailing" , 1
qtTestRecovery.Add "C:\TEST\Project\RecoveryScenario\Test Note.qrs", "TestNote" , 2
For intIndex = 1 To qtTestRecovery.Count
qtTestRecovery.Item(intIndex).Enabled = True
Next
qtTestRecovery.Enabled = true
qtTestRecovery.SetActivationMode "OnError"
Set qtApp = Nothing
Set qtTestRecovery = Nothing
End Function