Return

class Return
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:

Return

DeactivateExpectation()

Deactivates the expectation so that the result will not be evaluated.

DeactivateSaveIn()

Deactivates the return’s save in property, so the value will not be stored in a package variable.

GetExpectation()

Returns the expectation expression from the evaluation of the test step, or None, if no expectation was defined.

Returns:

The expectation

Return type:

Expectation

GetIdentifier()

Returns the identifier of the argument.

Returns:

Identifier of return.

Return type:

str

GetSaveInVariableName()

Returns the currently selected variable to save the return value.

Returns:

The variable’s name or None if return value is not saved to a variable by the keyword test step.

Return type:

str

GetUnit()

Returns the unit of the return.

Returns:

Unit string of return or None if no unit information is attached.

Return type:

str

SetExpectation(expectation)

Sets the expectation in the evaluation of the test step. The expectation will be activated if it was not enabled previously.

Parameters:
expectation

The expectation

Raises:

ValueError – If the expectation is not of type NumericExpectation or StringExpectation

SetSaveInVariableName(variableName)

Sets the name of the variable used for storing data by the return. The variable will be created automatically if it does not already exist in the package where the return is placed in.

Parameters:
variableName : str

The variable’s name. Must not be None or an empty string.

Raises:

ApiError – If variableName is None or an empty string

SetUnit(unit)

Sets the unit of the return.

Parameters:
unit : str

Unit string of return. Use None to remove unit information.