StringExpectation

class StringExpectation

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:

StringExpectation

GetCaseSensitive()

Returns whether the comparison should be case-sensitive.

Returns:

True if case-sensitive, else False.

Return type:

boolean

GetDontEvalNotPresent()

Returns whether the option to evaluate this expectation if the expected value is NotPresent is set or not.

Returns:

True if the described behavior is enabled otherwise False.

Return type:

boolean

GetExpression()

Returns the expectations expression.

Returns:

The expression

Return type:

str

GetExpressionObject()

Returns the expectations expression. Currently only KeywordValueExpression are supported!

Returns:

The expression

Return type:

KeywordValueExpression

GetExpressionType()

Returns how the actual value and the expression value will be compared.

Returns:

The expression type

Return type:

str

SetCaseSensitive(caseSensitive)

Sets whether the comparison should be case-sensitive.

Parameters:
caseSensitive : boolean

True if case-sensitive, else False.

SetDontEvalNotPresent(dontEvalNotPresent)

Enables or disables the option to evaluate this expectation if the expected value is NotPresent.

Parameters:
dontEvalNotPresent : boolean

True to enable the described behavior. False to disable it.

SetExpression(expression)

Sets the expectations expression.

Parameters:
expression : str

The expression

SetExpressionObject(expression)

Sets the expectations expression. Currently only KeywordValueExpression are supported!

Parameters:
expression

The KeywordValue expression

SetExpressionType(expressionType)

Sets how the actual value and the expression value will be compared.

Parameters:
expressionType : str

The expression type. Possible values: - ‘identical’ (default) - ‘starts with’ - ‘ends with’ - ‘contains’ - ‘constains not’ - ‘dissimilar’