Activities
latest
false
Banner background image
Workflow Activities
Last updated Apr 22, 2024

VerifyExpressionWithOperator

Verifies an expression by asserting it in relation to a given expression with an operator.

Definition

Namespace: UiPath.Testing.API

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

Overloads

  
VerifyExpressionWithOperator(object, Comparison, object, string)Verifies an expression by asserting it in relation to a given expression with an operator.
VerifyExpressionWithOperator(object, Comparison, object)string, bool, string, bool, bool)Verifies an expression by asserting it in relation to a given expression with an operator. You can also perform other configurations additional to the verification, such as configuring an output message format, or taking a screenshot in case the assertion fails.

VerifyExpressionWithOperator(object, Comparison, object, string)

Verifies an expression by asserting it in relation to a given expression with an operator.

bool VerifyExpressionWithOperator(
	Object firstExpression,
	Comparison operatorValue,
	Object secondExpression
       string outputMessageFormat = null
)bool VerifyExpressionWithOperator(
	Object firstExpression,
	Comparison operatorValue,
	Object secondExpression
       string outputMessageFormat = null
)
firstExpression Object
The first expression in the verification process.
operatorValue Comparison
Possible mathematical operators you want to use to verify the two expressions.
secondExpression Object
The second expression in the verification process.
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.

VerifyExpressionWithOperator(object, Comparison, object)string, bool, string, bool, bool)

Verifies an expression by asserting it in relation to a given expression with an operator. You can also perform other configurations additional to the verification, such as configuring an output message format, or taking a screenshot in case the assertion fails.

bool VerifyExpressionWithOperator(
	Object firstExpression,
	Comparison operatorValue,
	Object secondExpression,
	string outputMessageFormat,
	bool continueOnFailure,
	string alternativeVerificationTitle,
	bool takeScreenshotInCaseOfFailingAssertion,
	bool takeScreenshotInCaseOfSucceedingAssertion
)bool VerifyExpressionWithOperator(
	Object firstExpression,
	Comparison operatorValue,
	Object secondExpression,
	string outputMessageFormat,
	bool continueOnFailure,
	string alternativeVerificationTitle,
	bool takeScreenshotInCaseOfFailingAssertion,
	bool takeScreenshotInCaseOfSucceedingAssertion
)
firstExpression Object
The first expression in the verification process.
operatorValue Comparison
Possible mathematical operators you want to use to verify the two expressions.
secondExpression Object
The second expression in the verification process.
outputMessageFormat String
Format of output message. Supported arguments: {LeftExpression}, {LeftExpressionText}, {RightExpression}, {RightExpressionText}, {Result}, {Operator}. Example : {LeftExpressionText}" (with value {LeftExpression}) {Operator} {RightExpressionText} (with value {RightExpression}) has result {Result}.
continueOnFailure Boolean
Specifies if the automation should continue even when the activity throws an error. The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
alternativeVerificationTitle String
This title will be displayed in orchestrator.
takeScreenshotInCaseOfFailingAssertion Boolean
If set to True, takes a screenshot of the target process if the verification has failed.
takeScreenshotInCaseOfSucceedingAssertion Boolean
If set to True, takes a screenshot of the target process if the verification has been successful.

Return value

It is “True” if the Verification passed/succeeded, 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
Trust and Security
© 2005-2024 UiPath. All rights reserved.