Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pause script with code
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
From your original question, I thought maybe you wanted to see the error conditions (by breaking when the error occurs) but then you would stop/exit that particular script. If you want to run the rest of the test after you get a chance to examine the condition of the app under test when the error occurs, you could use the Command tab of the Debug window to manually re-enable your recovery scenario, then run your test from where it stopped. Put the code that disables the recovery scenario into a function named something like "DisableRecoveryScenario" (name doesn't matter) that you can call and give it one parameter named something like "status" (the name doesn't matter) and make it a boolean.

Change the code to use the parameter value instead of hard-coded "disable=true" :

Code:
TestRecovery.Item(intIndex).Disabled = Parameter("status")


When you're ready to re-enable your recovery scenario, call this function manually by going to the Debug window,click on the Command tab, and type: call DisableRecoveryScenario(false)

This should call your function and re-enable your recovery scenario.

If you want to automatically re-enable your recovery scenario without any manual intervention, I'm not sure how to do that. I'd have to think about it awhile, but I thought that you wanted the script to pause until you could look at the problem and the state of the universe, then pick up your script from where it stopped and continue on with the test once you understand the cause of the error.
Reply


Messages In This Thread
Pause script with code - by JRDew - 03-04-2011, 12:27 AM
RE: Pause script with code - by oleg8888 - 03-04-2011, 04:06 AM
RE: Pause script with code - by JRDew - 03-04-2011, 06:20 PM
RE: Pause script with code - by tdevick - 03-07-2011, 10:16 PM
RE: Pause script with code - by JRDew - 03-08-2011, 02:03 AM
RE: Pause script with code - by tdevick - 03-08-2011, 09:46 PM
RE: Pause script with code - by aardvax - 03-08-2011, 07:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  VB script Code. Tejas Tikhe 2 3,651 06-19-2012, 10:54 AM
Last Post: Tejas Tikhe
Rolleyes How to pause QTP script using DotNet Factory nistalaramesh 3 5,168 06-23-2011, 02:59 PM
Last Post: Saket
  Pause from QTP. logeshkumarvb 2 4,423 01-11-2011, 07:20 PM
Last Post: UFTEnthusiast
  need script to pause the test kumsweta 1 3,432 12-02-2008, 09:26 PM
Last Post: roxer

Forum Jump:


Users browsing this thread: 1 Guest(s)