activities
latest
false
Workflow Activities
Last updated Oct 31, 2024

VerifyIsLess

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

Definition

Namespace: UiPath.Testing.API

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

VerifyIsLess(object, object, string)

bool VerifyIsLess(
       object firstExpression,
       object secondExpression
       string outputMessageFormat = null
)bool VerifyIsLess(
       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 less than the second expression , and False if the first expression is equal to or greater 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 VerifyIsLess 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 VerifyIsLess API, which includes configuring the outputMessageFormat parameter:
// Initialize variables for the expressions to be verified
var expression1 = 4;
var expression2 = 5;

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

// Employ the VerifyIsLess API, with the last string parameter being the outputMessageFormat
testing.VerifyIsLess(expression1, expression2, "{LeftExpression} should be lower 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.