Micro Focus QTP (UFT) Forums

Full Version: End Loop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have an If statement that allows the script to advance if TRUE or Reruns the test from the beginning if FALSE. The first step (in the beginning) uses a datatable to pick a user name and then the next steps advance forward to the conditional statement if true complete test.

The issue is,

if TRUE --> CheckMenuOption =Browser("Main Menu").Page("Main Menu").Link("Reporting").Check (CheckPoint("Reporting")) --> there is no need to run the test again.

How can I program it to do that?

Any ideas?

Thanks - Charles
if CheckMenuOption =Browser("Main Menu").Page("Main Menu").Link("Reporting").Check (CheckPoint("Reporting")) then ExitTest
Sakit - thanks for the reply but I think I misstated it - I actually don't want to end the test I just didn't want it to grab the next user in the DataTable. I found the solution - the DataTable.DeleteSheet method. It deletes the run-time datatable when my condition is True therefore it doesn't run the test over after it is true. :-)