Micro Focus QTP (UFT) Forums
how to initiate from 3rd script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: how to initiate from 3rd script (/Thread-how-to-initiate-from-3rd-script)



how to initiate from 3rd script - quicktest - 10-06-2010

Hi,

If I have n no. of scripts and when i run the QTP, it runs from the first script i've created. What should i do to run from the (i mean the start script) 3rd or any other script in between


RE: how to initiate from 3rd script - PrabhatN - 10-06-2010

Hi,

You can create a new action on top of all actions and call all the actions inside the new action in an order you want the actions to be executed. Then inside the new action run from any step (i.e any action) by "Run from step" option.

Hope it helps you.


RE: how to initiate from 3rd script - Pallavii - 10-06-2010

Scripts in the sense, are u talking about actions?
The other way is, just right click on the action in 'Test Flow' panel, and select 'Run from Action' option.


RE: how to initiate from 3rd script - guin.anirban - 10-06-2010

Yes Prabhat is correct. You can do that one else you place the cursor from where you want to execute in your existing script and then select the option "Run from step" by right clicking or presss only "ctrl+F5".


RE: how to initiate from 3rd script - KavitaPriyaCR - 10-06-2010

If you are talking about scripts, then it can be done like:
Write .vbs file where you will have a function to execute the scripts by launching the qtp.
EX:
Code:
If (Condition1) Then
ExecuteScript "Path\script1"
Else
   If (Condition2) Then
     ExecuteScript "Path\script2"
   End If
End If
Public sub ExecuteScript(ScriptPath)
..
..
..
End Sub


Now run this vbs file.