For Each

Search Knowledge Base by Keyword

< Back

This is a loop construct that allows the user to repeat a group of statements/actions for each element in a Collection. The user must specify the Visual Basic Collection Data Type (List of Integers, List of Strings, Arrays etc.).

‘For Each’ Properties:

Property NameData TypeProperty TypeProperty Description
DisplayNameStringThe name of the action box.
TypeArgumentData Type of members of property 'Values'.The Data Type of the members of the Collection.
ValuesCollection Data Type (List of Integers, List of Strings, etc.)InputThe Data Type of the Collection.

Example pseudo-code:

Variable Num_List is of type List of Int32
Num_List ={1,10,100}

for each Int32 in Num_List 
  write ("Model Based Testing Rocks\n")

Output:
Model Based Testing Rocks
Model Based Testing Rocks
Model Based Testing Rocks