Thursday, June 4, 2009

Conditional loops int QTP?

Do...Loop Statement
Repeats a block of statements while a condition is True or until a condition becomes True.
Do [{While Until} condition]
[statements]
[Exit Do]
[statements]
Loop
Or, you can use this syntax:
Do
[statements]
[Exit Do]
[statements]
Loop [{While Until} condition]
ex:
Do
Loop While False
Do
Loop Until True
While...Wend Statement
Executes a series of statements as long as a given condition is True.
While condition
Version [statements]
Wend
For...Next Statement
Repeats a group of statements a specified number of times.
For counter = start To end [Step step]
[statements]
[Exit For]
[statements]
Next
For Each...Next Statement
Repeats a group of statements for each element in an array or collection.
For Each element In group
[statements]
[Exit For]
[statements]
Next [element]

No comments:

Post a Comment