Posts: 19
Threads: 5
Joined: Aug 2009
Reputation:
0
01-30-2010, 11:57 AM
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
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
02-01-2010, 10:12 AM
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.
Posts: 13
Threads: 4
Joined: Jan 2010
Reputation:
0
02-01-2010, 12:15 PM
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.
Posts: 350
Threads: 2
Joined: Mar 2008
Reputation:
0
02-01-2010, 01:45 PM
Hi Rajvanan,
It seems your query is not related to this post & hence request you to open new post/thread.
Posts: 13
Threads: 4
Joined: Jan 2010
Reputation:
0
02-01-2010, 02:33 PM
Hi,
Actually i heard that thesee commands are used for this purpose only.
To skip the lines while execution.
Pls explain.
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
02-01-2010, 03:14 PM
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.