TsSelectList¶
- class TsSelectList¶
Returned by
- AppendChoiceItem(itemExpr)¶
Appends a choice item to the list of items.
- Parameters:
- itemExpr : str¶
Choice item expression
- AppendSeparatorItem()¶
Appends a non selectable separator item to the list of items.
- 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:
- DeactivateItemVariable()¶
Deactivates the read items from variable option.
- DeactivateSaveInVariable()¶
Deactivates the save in variable option.
- DeleteTranslatedCommentText(language)¶
Deletes a comment for the test step in the given language.
- Parameters:
- language : str¶
Language of the text (‘en_US’, ‘de_DE’, ‘zh_CN’)
- GetActionColumnText()¶
Returns the text value of the “action” column.
- Returns:
Action column text
- Return type:
str
- GetComment()¶
Returns the comment of the test step in the current test case language.
- Returns:
Comment text as shown in the comment tab
- Return type:
str
- GetCommentColumnText()¶
Returns the text value of the “comment” column.
- Returns:
Comment column text
- Return type:
str
- GetDialogDescriptionExpression()¶
Returns the dialog description expression.
- Returns:
Dialog description expression
- Return type:
str
- GetDialogTitleExpression()¶
Returns the dialog title expression.
- Returns:
Dialog title expression
- Return type:
str
- GetError()¶
Returns a list of errors. Note that the error messages depend on the program language ecu.test is set to. Because of that we do not recommend to check against exact error messages, unless you are certain about the respective program language.
- Returns:
List of errors
- Return type:
list[str]
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
integer
- GetItemVariableNameExpression()¶
Returns the item variable name expression. The variable specified by this name expression is supposed to be a vector that contains all choices as expressions.
- Returns:
Item variable name expression. None if the item variable option is disabled.
- Return type:
str
-
GetItems(includeSeparators=
False)¶ Returns all items as list of strings.
- Parameters:
- includeSeparators : boolean¶
Whether to include separators or not (optional, defaults to False)
- Returns:
List of item expressions
- Return type:
list[str]
- GetLineNo()¶
Returns the test steps line number within its test case.
- Returns:
Line number
- Return type:
int
- GetMaxSelectionExpression()¶
Returns the expression that defines the maxmimum selection count.
- Returns:
Maxmimum selection expression
- Return type:
str
- GetMinSelectionExpression()¶
Returns the expression that defines the minimum selection count.
- Returns:
Minimum selection expression
- Return type:
str
- GetParameterColumnText()¶
Returns the text value of the “parameter” column.
- Returns:
Parameter column text
- Return type:
str
- GetParent()¶
Returns the parent test step.
- Returns:
The parent test step or None if it is a top level test step.
- Return type:
- GetPreselectionExpression()¶
Returns the preselection expression.
- Returns:
Preselection expression
- Return type:
str
- GetSaveInVariableName()¶
Returns the save in variable name.
- Returns:
Save in variable name
- Return type:
str
- GetTags()¶
Returns the tags set for this step.
- Returns:
A (sorted) list of tags
- Return type:
list[str]
- GetTestManagementId()¶
Returns the test management id of the test step.
- Returns:
Test step id.
- Return type:
str
- GetTestStepId()¶
Returns the test step id.
- Returns:
test step id
- Return type:
str
- GetTranslatedCommentText(language)¶
Returns the text value of the “comment” column in the given language.
- Parameters:
- language : str¶
Language of the requested text (‘en_US’, ‘de_DE’, ‘zh_CN’)
- Returns:
Comment column text
- Return type:
str
- GetType()¶
Returns the type (class name) of the test step, e.g.
“TsPreconditionBlock”
“TsWait”
“TsIfThenElse”
“TsSwitchCase”
“TsCaseNode”
- Returns:
Type (class name) of the test step
- Return type:
str
- GetValueColumnText()¶
Returns the text value of the “value” column in your current test case language.
- Returns:
Value column text
- Return type:
str
- IsBreakpoint()¶
Checks whether the test step is a break point.
- Returns:
True if test step is a break point, else False
- Return type:
boolean
- IsContainer()¶
Returns True, if the test step supports calling GetChildren as well as manipulating the structure of its children. (e. g. via inserting or deleting sub test steps).
- Returns:
True if it can contain test steps, else False
- Return type:
boolean
- IsEnabled()¶
Returns the state of the test step.
- Returns:
True if test step is enabled, otherwise False
- Return type:
bool
- IsInPostcondition()¶
Returns True if the test step is located in a postcondition
- Returns:
True if the test step is located in a postcondition, else Flase
- Return type:
bool
- IsInPrecondition()¶
Returns True if the test step is located in a precondition
- Returns:
True if the test step is located in a precondition, else False
- Return type:
bool
- IsMaximizeEnabled()¶
Returns whether the window will be maximized or not.
- Returns:
Whether the window will be maximized
- Return type:
boolean
- IsOk()¶
Returns the internal state of correctness of the test step.
- Returns:
True if no problems were found, else False
- Return type:
boolean
- IsVisible()¶
Checks whether the test step is visible. This depends on the test step itself or a parent test step being disabled.
- Returns:
True if test step is visible, else False
- Return type:
boolean
- RemoveItem(idx)¶
Removes the item at the given index. Use GetItems(includeSeperators=True) to determine which item has which index.
- Parameters:
- idx : integer¶
Index of the item to be removed
- SetBreakpoint(enable)¶
Sets or unsets the test step to act as a break point.
- Parameters:
- enable : boolean¶
True if test step is a break point, else False
- SetComment(comment)¶
Sets a comment for the test step in the current test case language.
- Parameters:
- comment : str¶
Text to be displayed in the comment tab
- SetDialogDescriptionExpression(descrExpr)¶
Sets the dialog description expression.
- Parameters:
- descrExpr : str¶
Dialog description expression
- SetDialogTitleExpression(titleExpression)¶
Sets the dialog title expression.
- Parameters:
- titleExpression : str¶
Dialog title expression
-
SetEnabled(state=
True)¶ Enable or disable the test step.
- Parameters:
- state : bool¶
True (Default) to enable, False to disable the test step.
- SetItemVariableNameExpression(nameExpr)¶
Sets the item variable name expression. The variable specified by this name expression is supposed to be a vector that contains all choices as expressions.
- Parameters:
- nameExpr : str¶
Item variable name expression.
- SetMaxSelectionExpression(maxSelect)¶
Sets the expression that defines the maxmimum selection count.
- Parameters:
- maxSelect : str¶
Maxmimum selection expression
-
SetMaximize(maximize=
True)¶ Sets whether the window will be maximized or not.
- Parameters:
- maximize : boolean¶
Whether the window will be maximized
- SetMinSelectionExpression(minSelect)¶
Sets the expression that defines the minimum selection count.
- Parameters:
- minSelect : str¶
Minimum selection expression
- SetPreselectionExpression(preSelect)¶
Sets the preselection expression. This expression specifies which choices are pre selected. This expression must contain a list of pre selected items as str. E.g. u”[u’selection1’, u’selection2’]”
- Parameters:
- preSelect : str¶
Preselection expression
- SetSaveInVariableName(varName)¶
Sets the save in variable name.
- Parameters:
- varName : str¶
Variable name
- SetTags(tags)¶
Set the list of tags for this step. The list of tags will be sorted and stored.
- Parameters:
The list of tags
- SetTestManagementId(testManagementId)¶
Sets the test management id of the test step.
- Parameters:
- testManagementId : str¶
Test management id of the test step