Micro Focus QTP (UFT) Forums
How to skip the execution of Script lines in run time - 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: How to skip the execution of Script lines in run time (/Thread-How-to-skip-the-execution-of-Script-lines-in-run-time)



How to skip the execution of Script lines in run time - azeem - 01-30-2010

Hi everybody, Could you please help me in understanding of How to skip the execution of Script lines in run time.

for suppose once the if condition is true I want to skip few lines in the script
currentcursor at 100th line
eg:
if (a=10)
Goto line 400
Endif

Please help me.
Thanks,
Azeem


RE: How to skip the execution of Script lines in run time - Saket - 02-01-2010

No Azeem, Goto line is not supported in QTP.

what you can do is, create a function and call the function when your if statement is true.


RE: How to skip the execution of Script lines in run time - rajvanan - 02-01-2010

Sanket,

I heard that "step over" and "step into" are used. I have tried using them but they do the same thing as run, can u pls tell us the exact difference b/tw the two.


RE: How to skip the execution of Script lines in run time - sreekanth chilam - 02-01-2010

Hi Rajvanan,

It seems your query is not related to this post & hence request you to open new post/thread.


RE: How to skip the execution of Script lines in run time - rajvanan - 02-01-2010

Hi,

Actually i heard that thesee commands are used for this purpose only.
To skip the lines while execution.
Pls explain.


RE: How to skip the execution of Script lines in run time - Saket - 02-01-2010

No, you heard it wrong. step over and step into are used while debugging.
Excerpt from QTP help-
Step Into runs only the current step in the active test or function library. If the current step calls another action or a function, the called action or function is displayed in the QuickTest window, and the test or function library pauses at the first line of the called action or function.
Step Over runs only the current step in the active test or function library. If the current step calls another action or a user-defined function, the called action or function is executed in its entirety, but the called action or function script is not displayed in the QuickTest window. The run session then returns to the calling test or function library and pauses at the next line.
refer QTP help for more details on debugging.