How to call Action - 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 Action (/Thread-How-to-call-Action) |
How to call Action - sudhirzpatil - 02-09-2009 Hi Friends, I have created two action. 1 Login 2 Insert Flight order. In first action I an parameterizing Login In second action i am parameterizing Fly From dates. But before going for second login, it should run all Fly from dates. For this i am inserting below line after last line of second action. RunAction Insert Flight order, AllIteration but insted of getting different dates from datatable,it is accepting first date and the the code is executing continusly. My aim is i want to first login with any user, insert the order for different Fly dates and run this whole test for different login user. Hope you guys help me Thnks in advance RE: How to call Action - sreekanth chilam - 02-09-2009 Hi , Find the following way : Step 1 : Create 3 Actions 1)Login ---> 3 rows of data in global sheet of datatable(3 userNames & pwds) 2)Insert_FlightOrder --> 3 rows of data in Localsheet of Datatable ( 3 different filght dates ) 3)Exit Step2 : Go to Keyword View -> Select "Insert_FlightOrder" Action --> Right Click "Action Call Properties" --> Choose "Run on All rows" Step3 : Now execute the script & see .... it will work as expected _________________________________________________________________________________________________________ FYI...Find the entire code for your requirement given below : Code for "Login" Action : Code: invokeapplication "D:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe" Code for "Insert_FlightOrder" Action : Code: Window("Flight Reservation").WinMenu("Menu").Select "File;New Order" Code for "Exit" Action : Code: Window("Flight Reservation").WinMenu("Menu").Select "File;Exit" RE: How to call Action - sudhirzpatil - 02-10-2009 Hi sreekanth , thanks a lot . Finally i done it. But just a one point i have to add for step 2 I am not able to Right Click "Action Call Properties" from keyword view as you told. As i am using QTP 9.5 I found the path as Go To the Test Flow >> select the Action >> Right click "Action Call Properties".>> Choose "Run on All rows" thanks a lot again. RE: How to call Action - Forrest Gump - 08-25-2011 Hi This really worked and was explained really well. I would like to know if in Action2, the data varies dynamically i.e., for every login from Action1, if data in Action 2 varies for each login users; how to do that. I mean in Point2 of step1. Step 1 : Create 3 Actions 1)Login ---> 3 rows of data in global sheet of datatable(3 userNames & pwds) 2)Insert_FlightOrder --> 3 rows (Data varies dynamically i.e., different login has different number of rows) of data in Localsheet of Datatable ( 3 different filght dates ) 3)Exit RE: How to call Action - ashita - 08-26-2011 Hi Everyone, Can you please explain me how can I create new action? Thanks Ashita RE: How to call Action - Forrest Gump - 08-27-2011 Hi Ashita, To create new action: Goto "Insert" Menu and then click on "Call to New Action" i.e., Menu: Insert--> Call to New Action Regards, - Forest Gump |