Micro Focus QTP (UFT) Forums
about first iteration - 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: about first iteration (/Thread-about-first-iteration)



about first iteration - sekhan - 10-12-2010

When i run my test, my action will be executed step by step through all of scripts. When i have many data, the test will execute many iterations.
In the first iteration, the test will run all of the scripts. but remaining iteration, i want to ignore some steps.
Exam:
I want this script just run in first iteration
Datatable.import("...")

how must i do?


RE: about first iteration - KavitaPriyaCR - 10-12-2010

Question is not clear for me, Pls give some more info.


RE: about first iteration - PrabhatN - 10-12-2010

Hi Sekhan,

Take help of "ActionIteration" environment variable. It returns the action iteration number.

As for your emample, put the code below in the first line of the action in which you want to import value to DataTable.

Code:
If Environment("ActionIteration") = 1 Then
   DataTable.Import.......
End If

You can make use of this condition at any point of any action

Hope it will help you Smile