I'm having an issue getting an action to iterate properly. The individual actions I have are:
Login -> Enter Data -> Checker
- Login - I just want to log in once
- Enter Data - I have multiple rows of data saved in the global data sheet. I want to iterate through each one of these rows before moving on to the next action
- Checker - I just want to perform this step once as the system can do a check on all the items entered during the Enter Data action in one go
I have the Solution settings to iterate one time and in the Enter Data Action Call properties I have it set to run for all rows. I made sure that the last row in Enter Data brings the browser screen back to the point where the first row in Enter Data should allow it to iterate through again ok. However when I run it's just entering the first row of Data and moving on to the Checker action.
Am I missing something? I guess it would be possible to code something using RowCount but it seems like I should be able to just use UFT functionality to handle?
I have the data in the Enter Data datatable (it's a global datatable as I need to use a couple of things from it for the Checker action). It correctly reads the first row in Enter Data and enters it into the browser as expected. Then instead of moving onto the second row it goes straight to the Checker action even though I have the Enter Data Action Call set to iterate all rows.
What Mark suggested is the local table for Enter Data, if you want the action to iterate all rows then the data needs to be in its own local datatable.
Maybe you need to review the data in your datatables to isolate what is globally needed and what is locally needed.
Gotcha. Shifted the data to local tables and it iterated all rows correctly. Thanks both for your help.
It's a pity that UFT can't read the global tables for this. There are instances where I need to pull some data from the Enter Data datatable to have it repeat in the Checker section. For example if I manually enter a trade order for $10,000 the checker functionality in our application requires the 2nd checker user to also manually enter in the $10,000 amount when doing the QC check to reduce the risk of people getting the order amount wrong.
When automating the testing of this it's not really that much of a problem to maintain 2 separate data tables but it would've been nice to just be able to pull from one global source in the same solution.
I put my globally required variables in a VBS library file that way they can be accessed by all Actions/Subs and Functions.
You could use this to store the currently required value and access it in your Checker Action.
Got your point and concern.
UFT is designed to use global datatable for test iteration and local datatable for action iteration.
Across actions you should be able to pass data around using parameters/enviroment variables.
Hope this helps further. 🙂
I had this same problem sometimes ago.
It was resolved when i put my test data in local datatable and looping/iteration action happen successfully.
Hope this helps!