Micro Focus QTP (UFT) Forums
How to run multiple iterations only on a set of lines in script - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to run multiple iterations only on a set of lines in script (/Thread-How-to-run-multiple-iterations-only-on-a-set-of-lines-in-script)



How to run multiple iterations only on a set of lines in script - amit25007 - 05-17-2016

Hello

Script is like below
Window("A").WinButton("Y").Click
            Dim i
            For i= 1 To 16 Step 1
                
                Window("A").Dialog(B").WinEdit("C").Set DataTable("Column1", dtLocalSheet) 
                wait(1)
                Window("A").Dialog("B").WinEdit("C").Set DataTable("Column2", dtLocalSheet)
                wait(1)
                Window("A").Dialog("B").WinButton("D").Click
       
            Next
Window("A").Dialog("B").WinButton("E").Click
 
In above script i am taking input from datatable and i need to take 16 entries from 16 rows.
Above script is in single action. i cant use multiple actions(i would have called mupltiple iteration for multiple action but have to use one action only)
How to make it work?


Regards
Amit