TsInputDialog

class TsInputDialog

Returned by

AddTag(tag)

Add a specific tag to this step.

Parameters:
tag : str

The tag to be set

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:

TsInputDialog

CreateCheckBox(identExpr=None, defaultExpr=None, toolTipExpr=None, varName=None, insPos=None)

Creates a new checkbox control.

Parameters:
identExpr : str

Identifier expression of the text control

defaultExpr : str

Value expression that specifies whether the checkbox is ticked initially

toolTipExpr : str

Tool tip expression

varName : str

Variable name in which the value will be stored

insPos : integer

Insert position of the control. Control will be appended if None.

CreateComboBox(identExpr=None, elementExpr=None, preselectExpr=None, toolTipExpr=None, varName=None, insPos=None)

Creates a new combobox control.

Parameters:
identExpr : str

Identifier expression of the text control

elementExpr : str

Expression containing a list that specifies all possible values. E.g. u”[‘choice1’, ‘choice2’]”

preselectExpr : str

Preselection expression

toolTipExpr : str

Tool tip expression

varName : str

Variable name in which the value will be stored

insPos : integer

Insert position of the control. Control will be appended if None.

CreateFileList(identExpr=None, pathExpr=None, filterExpr=None, toolTipExpr=None, varName=None, insPos=None)

Creates a new file list control.

Parameters:
identExpr : str

Identifier expression of the text control

pathExpr : str

Path expression

filterExpr : str

Filer expression

toolTipExpr : str

Tool tip expression

varName : str

Variable name in which the value will be stored

insPos : integer

Insert position of the control. Control will be appended if None.

CreateRadioButton(identExpr=None, defaultExpr=None, toolTipExpr=None, varName=None, insPos=None)

Creates a new radio button control.

Parameters:
identExpr : str

Identifier expression of the text control

defaultExpr : str

Value expression that specifies whether the radiobutton is ticked initially

toolTipExpr : str

Tool tip expression

varName : str

Variable name in which the value will be stored

insPos : integer

Insert position of the control. Control will be appended if None.

CreateTextCtrl(identExpr=None, defaultExpr=None, toolTipExpr=None, varName=None, insPos=None)

Creates a new text control.

Parameters:
identExpr : str

Indentifier expression of the text control

defaultExpr : str

Default value expression of the text control

toolTipExpr : str

Tool tip expression

varName : str

Variable name in which the value will be stored

insPos : integer

Insert position of the control. Control will be appended if None.

CreateTextCtrlMultiline(identExpr=None, defaultExpr=None, toolTipExpr=None, varName=None, insPos=None)

Creates a new multiline text control.

Parameters:
identExpr : str

Identifier expression of the text control

defaultExpr : str

Default value expression of the text control. Lines that are too long will be broken down automatically. A linebreak can be forced using ‘\n’.

toolTipExpr : str

Tool tip expression

varName : str

Variable name in which the value will be stored

insPos : integer

Insert position of the control. Control will be appended if None.

DeactivateSaveInVariable()

Deactivates the save in variable option.

DeactivateTimeout()

Deactivates the time out 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]

GetIdentifierExpressionByIndex(index)

Returns the identifier expression of the input control specified by index.

Parameters:
index : integer

Index of the input control

Returns:

Identifier expression

Return type:

str

GetIndex()

Returns the zero based index in the parent.

Returns:

Zero based index

Return type:

integer

GetInputCount()

Returns the number of input controls.

Returns:

Number of input controls

Return type:

integer

GetLineNo()

Returns the test steps line number within its test case.

Returns:

Line number

Return type:

int

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:

TestStep

GetPropertyExpressionByIndex(index, key)

Returns the property expression of the input control specified by index and property key.

Parameters:
index : integer

Index of the input control

key : str

Property key. Available property keys can be queried using GetPropertyKeysByIndex.

Returns:

Property expression of the input control

Return type:

str

GetPropertyKeysByIndex(index)

Returns all property keys of the input control specified by index. Property keys are used to access and manipulate properties of inputs. Use it as parameter for GetPropertyExpressionByIndex and SetPropertyExpressionByIndex.

Parameters:
index : integer

Index of the input control

Returns:

List of property keys

Return type:

list[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

GetTimeoutExpression()

Returns the timeout exrpression that defines the maximum user input time. The timeout unit may be retrieved with GetTimeoutUnit(). If the user exceeds this time the dialog will be closed.

Returns:

Timeout expression

Return type:

str

GetTimeoutUnit()

Returns the unit of the optional timeout.

Returns:

Unit of time (d, h, min, s, ms)

Return type:

str

GetToolTipExpressionByIndex(index)

Returns the tooltip expression of the input control specified by index.

Parameters:
index : integer

Index of the input control

Returns:

Tooltip expression

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

GetTypeByIndex(index)

Returns the type of the input control specified by index.

Parameters:
index : integer

Index of the input control

Returns:

Type of the input control. One of [u’TEXTCTRL’, u’TEXTCTRLMULTI’, u’COMBOBOX’, u’CHECKBOX’, u’RADIOBUTTON’, u’FILELIST’]

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

GetVariableNameByIndex(index)

Returns variable name of the input control specified by index.

Parameters:
index : integer

Index of the input control

Returns:

Variable name

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

RemoveInput(index)

Removes the input specified by index.

Parameters:
index : integer

Index of the input control

RemoveTag(tag)

Remove a specific tag from this step.

Parameters:
tag : str

The tag 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.

SetIdentifierExpressionByIndex(index, identExpr)

Sets the identifier expression of the input control specified by index.

Parameters:
index : integer

Index of the input control

identExpr : str

Identifier expression of the input control

SetMaximize(maximize=True)

Sets whether the window will be maximized or not.

Parameters:
maximize : boolean

Whether the window will be maximized

SetPropertyExpressionByIndex(index, key, valueExpr)

Sets the property expression of the input control specified by index and property key.

Parameters:
index : integer

Index of the input control

key : str

Property key. Available property keys can be queried using GetPropertyKeysByIndex.

valueExpr : str

Index of the input control

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:
tags : list[str]

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

SetTimeoutExpression(timeoutExpr)

Sets the timeout expression that defines the maximum user input time. The timeout unit may be specified with SetTimeoutUnit() (the default unit is seconds). If the user exceeds the specified time the dialog will be closed.

Parameters:
timeoutExpr : str

Timeout expression

SetTimeoutUnit(timeUnit)

Sets the time unit of the optional timeout.

Parameters:
timeUnit : str

Unit of time (d, h, min, s, ms)

SetToolTipExpressionByIndex(index, toolTipExpression)

Sets the tooltip expression of the input control specified by index.

Parameters:
index : integer

Index of the input control

toolTipExpression : str

Tooltop expression of the input control

SetTranslatedCommentText(comment, language)

Sets a comment for the test step in the given language.

Parameters:
comment : str

Text to be displayed

language : str

Language of the text (‘en_US’, ‘de_DE’, ‘zh_CN’)

SetVariableNameByIndex(index, varName)

Sets the variable name of the input control specified by index.

Parameters:
index : integer

Index of the input control

varName : str

Variable name of the input control