Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
invoking a recovery scenario
#1
Solved: 11 Years, 4 Months, 1 Week ago
hi
i have created a recovery scenario
but how would i be able to call this scenario through my script so that whenevr the popup occurs it perform some action

Thanks
Rames Tahiiani
Reply
#2
Solved: 11 Years, 4 Months, 1 Week ago
If the Recovery Setting has been set to "On Every Step" then it will "ping" back and forth to check if the pop-up occurs and if it does then it will perform the specified action.

Programmatically it is done this way,
Code:
Recovery.Activate
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 11 Years, 4 Months, 1 Week ago
Hi Ramesh,
Associate this recovery scenario with your script using File->Settings->Recovery-> Add this QRS file & set "On Every Step", then this recovery will be triggered.
Reply
#4
Solved: 11 Years, 4 Months, 1 Week ago
Thanks for the reply
so u mean to say that unlesss i give recovery.Actvate command the recovery scenarios wont get activated even i have added them in the settings

Is there any way to invoke these recovery scenarios through the code instead of adding them into the setting -> recovery

thanks
Ramesh Tahiliani
Reply
#5
Solved: 11 Years, 4 Months, 1 Week ago
Well, If you have a recovery scenario for pop up then run AUT under the condition that the pop will be appeared and then you will see the recovery scenario get activated and run.
Reply
#6
Solved: 11 Years, 4 Months, 1 Week ago
For VBS file : we can execute the file using ExecuteFile which will load the library file
dont we have the same mechanism for QRS (do we always need to associate the QRS from the GUI to the test )
Reply
#7
Solved: 11 Years, 4 Months, 1 Week ago
Hi Ramesh,
I don't think we can add repository at runtime as we do for library file. but this can be done without from the GUI if you are launching your test using a vbscript.

Code:
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

Reply
#8
Solved: 11 Years, 4 Months, 1 Week ago
Saket -
Repositories can also be added during runtime using the "RepositoriesCollection" Object.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#9
Solved: 11 Years, 4 Months, 1 Week ago
Sorry Ramesh, That was Typo, what I meant was recovery instead of repository.
Thanks for pointing out, Basanth.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create Video of a scenario shivangshah 0 1,239 01-30-2017, 07:45 PM
Last Post: shivangshah
  Default recovery scenario TurtleRock 1 2,930 05-30-2014, 02:17 PM
Last Post: Tarik Sheth
  Edit Recovery Scenario skegler 0 3,287 03-05-2014, 10:40 PM
Last Post: skegler
  recovery scenario for closing a message box itself ashima 0 2,242 12-26-2013, 11:10 AM
Last Post: ashima
  Object State - Recovery Scenario vIns 1 4,233 01-21-2013, 03:15 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)