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

Workflow Activities

Last updated Dec 20, 2024

VerifyIsGreater

Verifies that the first expression is greater than the second expression.

Definition

Namespace: UiPath.Testing.API

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

VerifyIsGreater(object, object, string)

bool VerifyIsGreater(
       object firstExpression,
       object secondExpression
       string outputMessageFormat = null
)bool VerifyIsGreater(
       object firstExpression,
       object secondExpression
       string outputMessageFormat = null
)
firstExpression Object
The first expression in the verification process.
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}

For more information, check the Configuring the outputMessageFormat section.

Return value

It is True if the first expression is greater than the second expression , and False if the first expression is equal or less than the second expression.

Configuring the outputMessageFormat

The outputMessageFormat parameter can be configured with supported arguments, that act as placeholders for the values used in the verification operation. These placeholders are automatically populated with the variables or values defined when invoking the API at runtime.

For the VerifyIsGreater API, you can implement the following supported arguments when creating an output message:

  • {LeftExpression}: Represents the value of the first expression you provided for the firstExpression parameter.
  • {LeftExpressionText}: Represents the text of the first expression you inserted for the firstExpression parameter.
  • {RightExpression}: Represents the value of the second expression you provided for the secondExpression parameter.
  • {RightExpressionText}: Represents the text of the second expression you inserted for the secondExpression parameter.
  • {Result}: Represents the API's return value, which is the verification result.
The following is an example on how to use the VerifyIsGreater API, which includes configuring the outputMessageFormat parameter:
// Initialize variables for the expressions to be verified
var expression1 = 7;
var expression2 = 6;

// Employ the VerifyIsGreater API, with the last string parameter being the outputMessageFormat
testing.VerifyIsGreater(expression1, expression2, "{LeftExpression} should be greater than {LowerLimitText}, and the result to this is {Result}");// Initialize variables for the expressions to be verified
var expression1 = 7;
var expression2 = 6;

// Employ the VerifyIsGreater API, with the last string parameter being the outputMessageFormat
testing.VerifyIsGreater(expression1, expression2, "{LeftExpression} should be greater than {LowerLimitText}, and the result to this is {Result}");

In the provided example, the placeholders within the curly brackets are replaced with the corresponding variable names and their values at runtime, providing a customized output message.

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.