EnumVariable

class EnumVariable

Returned by

AddEntry(value, text)

Adds an entry to the Enum initial entries. Raises an exception if the value is already contained in the enum.

Parameters:
value : int

The value of the entry

text : str

The text of the entry

Returns:

The created enum

Return type:

EnumVariableElement

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:

EnumVariable

GetDescription()

Returns the description of the variable.

Returns:

Description of variable

Return type:

str

GetEntries()

Returns the initial value of the variable or an empty list if it is not an Enum.

Returns:

Initial value of the variable

Return type:

list[EnumVariableElement]

GetInitialText()

Returns the initial text of the variable.

Returns:

The initial text of the variable

Return type:

str

GetInitialValue()

Returns the initial value of the enum.

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

RemoveEntry(value)

Deletes an entry from the enum.

Parameters:
value : int

The value of the entry

SetDescription(description)

Sets the description of the variable.

Parameters:
description : str

Description of variable

SetInitialValue(value)

Selects the initial value of the enum. The entry needs to be added by using AddEntry before.

Parameters:
value : int

The number that should initially be used as the current value.

SetParameter(enable=True)

Sets whether the variable is a parameter or not.

Parameters:
enable : boolean

Whether the variable is a parameter or not

SetRecorded(enable=True)

Sets the recording state of the variable to the value of enable.

Parameters:
enable : boolean

Whether to enable the recording of the variable

SetReturn(enable=True)

Sets whether the variable is a return value or not.

Parameters:
enable : boolean

Whether the variable is a return value or not