Micro Focus QTP (UFT) Forums

Full Version: Iterating, DataTable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I am using this code to run the same test through different urls.
Code:
SystemUtil.Run "iexplore",DataTable("FEs",dtLocalSheet)

Q:
Is there I way to have one step or action to be run only in the first iteration.

Thanks in advance.

Regards,
Mukesh L.
Hi Mukesh,

Please be more specific as the relation b/w the URL statement given by you with the question is not very clear.

Smile
Hi Mukesh,

I think you are looking for feature shown in the screenshot.

Also while calling an action you can provide the number of iteration
Code:
RunAction "MyAction", oneIteration, InputParameter, MyOutPutParameter

Else Code It Smile
Hi Ankur,
Ok sorry for not being clear. I am doing regression testing on 4 urls and I have several actions in my test suite. And I use this peace of code in the Driver action:

Code:
' Driver action(Local sheet)  has 4 urls, IE are started 4 times and all actions are performed 4 times
SystemUtil.Run "iexplore",DataTable("FEs",dtLocalSheet)


The Driver sheet in the Datatable has 4 rows with different urls. So because of the code above tests are being iterated 4 times. My dilemma is that I want to perform one step say MsgBox "Hi welcome ...." only in the first iteration. But now any new steps or actions I put in any were are being executed 4 times. I hope this is relevantly clear Big Grin

Btw. why doesn't the <code> tag work Sad

Regards,
Mukesh L.

Hi Rajeshwar,

Yes I have it on "Run on all rows", and that Runaction seems to be the solution to my dilemma. I will try it out and update the result here. Thanks for the help Wink

Regards,
Mukesh L.