![]() |
How to call testscript after executing previous one. - 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 call testscript after executing previous one. (/Thread-How-to-call-testscript-after-executing-previous-one) |
How to call testscript after executing previous one. - upadhyay40 - 11-23-2009 Hello All, I want to call existing testscript after completion of one of my other testscript, how would i call testscript within testscript, please let me know hoping for your cooperation. Thanks Mahesh RE: How to call testscript after executing previous one. - sylu82 - 11-24-2009 Convert the exiting script as a reusable action and call that action into other test script. To create reusable action: 1. Open the existing script by using qtp. 2. Goto ToolBar>Edit>Action>Action Properties. 3. In the action properties window Check the check box Reusable action and in the name text field>Enter your desire action name. 4. Save your test. Now open the new test: 1. Goto ToolBar>Insert>Copy of action/call to existing action [Note: Call to existing action you cann't edit the action] 2. In the selection action window>Selet the Path of the located action. 3. Make Sure you have always check the "After the Current step". 4. Click on the ok button Check the code EG: RunAction "Copy of Action1", oneIteration [This is copy of action] so if you choose call to exit action the code is Eg:RunAction "Action1 [PrinterFromControlPanel]", oneIteration Thanks, Sylu And also insted of action you can create the functions and use them. RE: How to call testscript after executing previous one. - upadhyay40 - 12-03-2009 Hi Sylu, Thanks for your response, i achieve what i want, thanks once again. Mahesh RE: How to excute For Statment in my Script - Wigi - 04-27-2014 Hello All, I want to execute Testscript with For Statment, and i would that two Iteration.in the Run time Session the Testscript is only one Iteration and the Run Session in line waiting. Code: Window("Program Manager").WinListView("SysListView32").Activate "Flight GUI" Code: Window("Flight Reservation").WaitProperty "enabled", 1, 10000 Code: Window("Flight Reservation").WinButton("Update Order").WaitProperty "enabled", 1, 10000 Code: Window("Flight Reservation").WinMenu("Menu").Select "File;Exit" |