Skip to content

Commands for Conditional (Branching) Flow Control

Worksoft SaaS supports the following commands (constructs) to help you implement conditional (also called branching) flow control type logic into your automated tests:
  • If-Elsif-Else-EndIf
  • Break (Cause execution within a loop to immediately exit)
The table(s) below list the commands in the ascending alphabetic order within each category along with a brief description of the purpose behind the command. By clicking on the hyperlinked command name in the table(s) below, you can review more detailed information about a specific command that includes the syntax for you to follow when using the commands.

Please note that these constructs are supported within QaSCRIBE as well Worksoft SaaS application (Edit Test Script screen).
Command Purpose
else When conditional in 'if' command evaluates to false then series of commands listed below this command will be executed until it encounters 'endIf' command.
elseIf If the conditional evaluates to true then the series of commands listed in 'elseIf' block will be executed. If the expression evaluates to false it jumps to 'else block' and execute commands below the 'else' command until 'endIf' command is encountered. Every 'elseIf' command should end with 'endIf' command (whereas 'else' command is optional)
endIf Marks the end of a if block.
if If the conditional evaluates to true then the series of commands listed in 'if block' will be executed. If the expression evaluates to false it jumps to 'else block' and execute commands below the 'else' command until 'endIf' command is encountered. Every 'if' command should end with 'endIf' command (whereas 'else' command is optional).

Feedback and Knowledge Base