Highlighted
Frequent Contributor.
Frequent Contributor.
1407 views

UFT 14.03 - Action Loop

Jump to solution

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?

Thanks,

C.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner
Knowledge Partner

Re: UFT 14.03 - Action Loop

Jump to solution

Have you tried purtting your data in the "Enter Data" datatable?

Mark Smith.

View solution in original post

7 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: UFT 14.03 - Action Loop

Jump to solution

Have you tried purtting your data in the "Enter Data" datatable?

Mark Smith.

View solution in original post

Highlighted
Frequent Contributor.
Frequent Contributor.

Re: UFT 14.03 - Action Loop

Jump to solution

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.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: UFT 14.03 - Action Loop

Jump to solution

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.

 

Highlighted
Frequent Contributor.
Frequent Contributor.

Re: UFT 14.03 - Action Loop

Jump to solution

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.

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: UFT 14.03 - Action Loop

Jump to 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.

Mark Smith.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: UFT 14.03 - Action Loop

Jump to solution

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. 🙂

0 Likes
Highlighted
Contributor.
Contributor.

Re: UFT 14.03 - Action Loop

Jump to solution

Hi Mate

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!

Thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.