OTX Reference  
OpenTestSystem.Otx.Core.Nodes.Node.CompoundNode.Branch Class Reference

Conditional branching (if-elseif-else) More...

Inheritance diagram for OpenTestSystem.Otx.Core.Nodes.Node.CompoundNode.Branch:
Inheritance graph

Classes

class  BranchRealisation
 Contains one if element followed by an optional list of elseif elements and an optional else element. More...
 

Public Attributes

BranchRealisation realisation
 Contains one if element followed by an optional list of elseif elements and an optional else element. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Nodes.Node
System.Boolean disabled
 To turn on/off a node. A deactivated node is not executed at run time. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.UniversalTypes.NamedAndSpecified
ExtensibleData[] extendedData
 Declares general data for NamedAndSpecified which can be extented by new general data defined in new OTX extensions using the standardised extension mechanism. For example it can be used to specify specification relevant content in a better structured way. More...
 
OtxId id
 Unique identifier of an element More...
 
MetaData metaData
 Additional tool-specific data More...
 
OtxName name
 Name of an element More...
 
NamedAndSpecifiedSpecification[] specification
 Descriptive specification More...
 

Detailed Description

Conditional branching (if-elseif-else)

For conditional execution of flows, Branch nodes are used. With a Branch node, a series of one or more condition-flow pairs can be defined. The conditions are evaluated one after the other, in the order of appearance in the document. The flow of the first true condition found will be executed. If no condition holds, an optional unconditional flow will be executed, if given. The Branch construct is commonly referred to as "if-elseif-else"-statement.

Syntax
if (BooleanTerm)
{
...
}
[else if (BooleanTerm)
{
...
}]
[else
{
...
}]
Examples
// Local Declarations
String str;
String Location = "DE";
// Flow
if (Location == "DE")
{
str = "Hallo Welt!";
}
else
{
str = "Hello World!";
}
Hmi.ConfirmDialog(str, "Open Test Framework", @MessageTypes:INFO, NULL);

Member Data Documentation

◆ realisation

BranchRealisation OpenTestSystem.Otx.Core.Nodes.Node.CompoundNode.Branch.realisation

Contains one if element followed by an optional list of elseif elements and an optional else element.