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

Workflow Activities

Last updated Jun 3, 2025

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.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
© 2005-2025 UiPath. All rights reserved.