Surrounding Steps with Control Blocks

Once you have added steps, it is also possible to surround one or more non-control steps with looping – For, While, StepSearch, BinarySearch– and script flow control instructions – If, Else – using the Script Steps table context menu commands.

To enclose a number of step(s) in looping or flow control statements:

  1. Select the contiguous steps to be surrounded using the common Shift + Click selection paradigm.
  2. Right-click the Script Steps pane and select the one of the Place Inside commands.
  3. Figure:If - Enclosed Steps below shows a number of instructions enclosed within an If / EndIf statement:

    Figure:If - Enclosed Steps

The surrounding of steps with looping or flow control instructions benefits from the TestComposer undo / redo functionality.