活动
最新
False
横幅背景图像
工作流活动
上次更新日期 2024年4月22日

预览
验证范围

验证表达式是否位于给定范围内。

定义

命名空间: UiPath.Testing.API

程序集: UiPath.Testing.Activities.Api(在 UiPath.Testing.Activities.Api.dll 中)

重载

  
VerifyRange(object,VerificationType, object, string)验证表达式是否位于给定范围内。
VerifyRange(object,VerificationType, object, object,string, bool, string, bool, bool)验证表达式是否位于给定范围内。 除了验证之外,您还可以执行其他配置,例如配置输出消息格式,或在断言失败时截取屏幕截图。

VerifyRange(object,VerificationType, object, string)

验证表达式是否位于给定范围内。

bool VerifyRange(
	Object expression,
	VerificationType verificationType,
	Object lowerLimit,
	Object upperLimit
)bool VerifyRange(
	Object expression,
	VerificationType verificationType,
	Object lowerLimit,
	Object upperLimit
)
expression 对象
要在给定范围内验证的表达式。
verificationType VerificationType
选择验证类型 - 范围内或范围外:
  • IsWithin
  • IsNotWithin
lowerLimit 对象
范围的下限。
upperLimit 对象
范围的上限。
outputMessageFormat 字符串
输出消息的格式。 支持的参数包括:
  • {LeftExpression}
  • {LeftExpressionText}
  • {RightExpression}
  • {RightExpressionText}
  • {Result}
  • {Operator}
例如,您可以使用以下输出消息格式:
"{LeftExpressionText}
    (with value {LeftExpression}) {Operator} {RightExpressionText} (with value {RightExpression})
    has result {Result}."{LeftExpressionText}
    (with value {LeftExpression}) {Operator} {RightExpressionText} (with value {RightExpression})
    has result {Result}.
此消息格式指示使用特定运算符在两个值或变量( LeftExpressionRightExpression )之间进行比较。 {Result}表示此比较的结果。

VerifyRange(Object,VerificationType, Object, Object,String, Boolean, String, Boolean, Boolean)

验证表达式是否位于给定范围内。您还可以执行验证以外的其他配置,例如配置输出消息格式,或者在断言失败时截取屏幕截图。

bool VerifyRange(
	Object expression,
	VerificationType verificationType,
	Object lowerLimit,
	Object upperLimit,
	string outputMessageFormat,
	bool continueOnFailure,
	string alternativeVerificationTitle,
	bool takeScreenshotInCaseOfFailingAssertion,
	bool takeScreenshotInCaseOfSucceedingAssertion
)bool VerifyRange(
	Object expression,
	VerificationType verificationType,
	Object lowerLimit,
	Object upperLimit,
	string outputMessageFormat,
	bool continueOnFailure,
	string alternativeVerificationTitle,
	bool takeScreenshotInCaseOfFailingAssertion,
	bool takeScreenshotInCaseOfSucceedingAssertion
)
expression 对象
要在给定范围内验证的表达式。
verificationType VerificationType
选择验证类型 - 范围内或范围外:
  • IsWithin
  • IsNotWithin
lowerLimit 对象
范围的下限。
upperLimit 对象
范围的上限。
outputMessageFormat 字符串
输出消息的格式。 支持的参数: {LeftExpression}{LeftExpressionText}{RightExpression}{RightExpressionText}{Result}{Operator}。 示例:“ {LeftExpressionText}”(值为 {LeftExpression}{Operator} {RightExpressionText} (值为 {RightExpression})的结果为 {Result}
continueOnFailure 布尔值
指定如果活动引发错误,是否仍应继续自动化。默认值为 False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。
alternativeVerificationTitle 字符串
这将在 Orchestrator 中显示。
takeScreenshotInCaseOfFailingAssertion 布尔值
如果设置为 True,则在验证失败时截取目标流程的屏幕截图。
takeScreenshotInCaseOfSucceedingAssertion 布尔值
如果设置为 True,则在验证成功后截取目标流程的屏幕截图。

返回值

如果验证通过/成功,则为“True”;如果验证失败,则为“False”。

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.