Micro Focus QTP (UFT) Forums
QTP-Re-executing script after completion of all iterations - 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: QTP-Re-executing script after completion of all iterations (/Thread-QTP-Re-executing-script-after-completion-of-all-iterations)



QTP-Re-executing script after completion of all iterations - JwalantBhatt0602 - 03-23-2016

Dear Friends,

Below is my script looks like

Statement 1
Statement 2
For I = 1 to RowCount
Statement 4
Statement 5
Statement 6
....
....
....
Next
Browser("Name").CloseAllTabs

Datatable (Global)
Testdata 1
Testdata 2
Testdata 3
Testdata n

(Global) (Action)

Problem:
After executing ALL test iterationS from Datatable (Global) using For Loop, QTP executes last statement "Browser("Name").CloseAllTabs". Then again it starts executing from top that is Statement 1 and re-entering in For loop to re-executing test data given in Datatable (Global)

What I was expecting - I was expecting to stop the execution because all iterations have been completed and script also has executed last statement. However, script cursor moved to very first statement of script and start executing from Top to Botton again.

Please help and let me know if you need further more information


RE: QTP-Re-executing script after completion of all iterations - JwalantBhatt0602 - 03-24-2016

What I was expecting -I was expecting to stop the execution because all iterations have been completed and script also has executed last statement. However, script cursor moved to very first statement of script and start executing from Top to Botton again.