activities
latest
false
UiPath logo, featuring letters U and I in white

Workflow activities

Last updated Mar 13, 2026

VerifyContains

Verifies if the first expression contains the second expression.

Definition

Namespace: UiPath.Testing.API

Assembly: UiPath.Testing.Activities.Api (in UiPath.Testing.Activities.Api.dll)

VerifyContains(object, object, string)

bool VerifyContains(
    object firstExpression,
    object secondExpression
    [string outputMessageFormat]
)
bool VerifyContains(
    object firstExpression,
    object secondExpression
    [string outputMessageFormat]
)

firstExpression Object : The first expression.

secondExpression Object : The second expression.

outputMessageFormat String : The format of the output message. The supported arguments are:

  • {LeftExpression}
  • {LeftExpressionText}
  • {RightExpression}
  • {RightExpressionText}
  • {Result}
  • {Operator}

For instance, you can use the following output message format:

{LeftExpressionText}
    (with value {LeftExpression}) {Operator} {RightExpressionText} (with value {RightExpression})
    has result {Result}.
{LeftExpressionText}
    (with value {LeftExpression}) {Operator} {RightExpressionText} (with value {RightExpression})
    has result {Result}.

This message format indicates a comparison between two values or variables (LeftExpression and RightExpression), using a certain operator. The {Result} represents the outcome of this comparison.

Return value

The return value is True if the verification passed, and False if the verification failed.

  • Definition
  • VerifyContains(object, object, string)
  • Return value

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated