Iterations settings - 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: Iterations settings (/Thread-Iterations-settings) |
Iterations settings - swetha.b - 12-05-2009 Hi ALL, My test run starts from login and ends with creating a record with few combinations involved in between. My requirement is this- After first iteration I want QTP not to start over again with login page rather to just start with creating an Account record. So could any body help me how do I set this condition? Note: Login should only happen in the first iterations rest all should follow from creating a record. RE: Iterations settings - sreekanth chilam - 12-05-2009 Hi , Try with the below steps: Step1 : File>Settings>Run>choose "Run Only One Iteration" Step2: Code: ' Login Code RE: Iterations settings - nil - 12-07-2009 Try to make use of Reusable Action Creat Login ,Add Account Action. Call Login ' First Call Call Add Account ' ' ' ' ' ' ' n times Thanks RE: Iterations settings - v_selvam - 12-07-2009 Diclare a global variable Code: Dim bLoggedIn = False call this function in your script. RE: Iterations settings - samson - 12-07-2009 Hi, Try these Steps below: 1: Split the action from where you need qtp to do the iteration. 2: Set action call properties of login action as " Run one iteration only" and the other action as per the requirement through action call properties. Welcome Samson.B RE: Iterations settings - swetha.b - 12-08-2009 Hi All, @samson . I have done the same settings , I split the login action as one - Action 1_1 and account creation as Action 1_2. For Action1_1 - Action call properties- One Iteration only For Action 1_2 - Action call properties - Run on all rows. Note: Login details are not in the data table. They set as constants in the script. When I run the test .. I happen to see login page every time an iteration ends. I even noticed that due to these settings only one row in the datatable is executed/retrieved on every iteration. Implies same record is created every time QTP runs next iteration. Was there a mistake in my settings?? Regards Swetha @ Srikanth My datatable is in global sheet. How do I declare this statement :- For i=1 to Datatable.GetSheet("AccountCreation").GetRowCount?? Could you be more clear on the explanation please. Thanks Swetha RE: Iterations settings - samson - 12-09-2009 The Action which we need to iterate for n times , need to perameterized right. 1: If so, we need to create a local sheet for qtp to pass the values to the required field (not in Global sheet). 2: Then set the Action Call Properties. Thank you, Welcome, Samson.B |