DynamicEnumVariable¶
- class DynamicEnumVariable¶
Returned by
- Clone()¶
Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.
- Returns:
A copy of this object
- Return type:
- GetDescription()¶
Returns the description of the variable.
- Returns:
Description of variable
- Return type:
str
- GetExpression()¶
Returns the expression that is used for the Enum variable.
- Returns:
Enum expression
- Return type:
str
- GetInitialText()¶
Returns the initial text of the variable. For dynamic Enums the initial text always corresponds to the first element of the evaluated expression or an empty string if no expression is given.
- Returns:
The initial text of the variable
- Return type:
str
- GetInitialValue()¶
Returns the initial value of the enum. For dynamic Texttables the initial numeric value always corresponds to the first element of the evaluated expression or 0 if no expression is given.
- Returns:
The initial value of the enum
- Return type:
int
- GetName()¶
Returns the name of the variable.
- Returns:
Name of variable
- Return type:
str
- GetType()¶
Returns the type of the initial value of the variable.
- Returns:
type of the initial value
- Return type:
str
- IsParameter()¶
Returns whether the variable is a parameter.
- Returns:
True if parameter, else False
- Return type:
boolean
- IsRecorded()¶
Returns whether the variable is recorded during execution.
- Returns:
True if recorded, else False
- Return type:
boolean
- IsReturn()¶
Returns whether the variable is a return value.
- Returns:
True if return value, else False
- Return type:
boolean
- SetDescription(description)¶
Sets the description of the variable.
- Parameters:
- description : str¶
Description of variable
- SetExpression(expression)¶
Sets the expression that is used to generate the list of strings for the Enum variable.
- Parameters:
- expression : str¶
Expression that evaluates to a list of strings
-
SetParameter(enable=
True)¶ Sets whether the variable is a parameter or not.
- Parameters:
- enable : boolean¶
Whether the variable is a parameter or not