Passing parameters dynamically to reusable actions - 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: Passing parameters dynamically to reusable actions (/Thread-Passing-parameters-dynamically-to-reusable-actions) |
Passing parameters dynamically to reusable actions - pkirangi - 10-05-2010 I have a main script which dynamically reads from the global data sheet, and determines the action and parameters. I can build the parameter string dynamically. But how would I be able to execute it, since the parameters I build would be string. Runaction actually requires you to enter parameters explicitly. Thanks and regards, PHK RE: Passing parameters dynamically to reusable actions - KavitaPriyaCR - 11-08-2010 Hi You can try the environment variable here. Save the dynamic values in Environment variable and use it in different actions RE: Passing parameters dynamically to reusable actions - ShrikantBiradar3449 - 11-15-2010 I have a main script which dynamically reads from the global data sheet, and determines the action and parameters. Hi, 1.You have to store the Parameters in Input and OutPut Parameters of Actions. 2.For Action2 you have to pass a parameter say "Customer Name" which is stored in Local sheet of Action1 then you can do it directly as below: ex: Code: Window("Flight Reservation").WinEdit("Name:").Set DataTable.Value("Customer_Name", "Action1") RE: Passing parameters dynamically to reusable actions - rajeshwar - 11-15-2010 Hi, Try using Execute statement, only thing you will have to format your string correctly. Example: Code: Execute "RUNACTION ""Action2"",oneiteration,OO" |