アクティビティ
最新
バナーの背景画像
ワークフローに関するアクティビティ
最終更新日 2024年4月22日

式を演算子で検証

演算子を使用して、指定した式と比較してアサートすることにより、式を検証します。

定義

名前 空間: UiPath.Testing.API

アセンブリ: UiPath.Testing.Activities.Api (UiPath.Testing.Activities.Api.dll の場合)

オーバー ロード

  
VerifyExpressionWithOperator(object, Comparison, object, string)演算子を使用して、指定した式と比較してアサートすることにより、式を検証します。
VerifyExpressionWithOperator(object, Comparison, object)string, bool, string, bool, bool)指定した式と演算子を使用して式をアサートすることで、式を検証します。 出力メッセージ形式の設定や、アサーションが失敗した場合のスクリーンショットの作成など、検証に追加して他の構成を実行することもできます。

VerifyExpressionWithOperator(object, Comparison, object, string)

演算子を使用して、指定した式と比較してアサートすることにより、式を検証します。

bool VerifyExpressionWithOperator(
	Object firstExpression,
	Comparison operatorValue,
	Object secondExpression
       string outputMessageFormat = null
)bool VerifyExpressionWithOperator(
	Object firstExpression,
	Comparison operatorValue,
	Object secondExpression
       string outputMessageFormat = null
)
firstExpression オブジェクト
検証プロセスの 1 つ目の式です。
operatorValue Comparison
2 つの式の検証に使用する、数学演算子。
secondExpression オブジェクト
検証プロセスの 2 番目の式です。
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}.
このメッセージ形式は、特定の演算子を使用した 2 つの値または変数 (LeftExpressionRightExpression) の比較を示します。{Result} は、この比較の結果を表します。

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

指定した式と演算子を使用して式をアサートすることで、式を検証します。 出力メッセージ形式の設定や、アサーションが失敗した場合のスクリーンショットの作成など、検証に追加して他の構成を実行することもできます。

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 オブジェクト
検証プロセスの 1 つ目の式です。
operatorValue Comparison
2 つの式の検証に使用する、数学演算子。
secondExpression オブジェクト
検証プロセスの 2 番目の式です。
outputMessageFormat 文字列
出力メッセージの書式です。 サポートされている引数: {LeftExpression}{LeftExpressionText}{RightExpression}{RightExpressionText}{Result}{Operator}。 例: {LeftExpressionText}" (値が {LeftExpression}の場合) {Operator} {RightExpressionText} (値 {RightExpression}を持つ) は結果 {Result}
continueOnFailure Boolean
アクティビティが例外をスローしてもオートメーションの実行を継続するかどうかを指定します。既定値は False です。その結果、フィールドが空白でエラーが発生すると、プロジェクトの実行が停止します。値を True に設定すると、プロジェクトの実行はエラーに関係なく継続されます。
alternativeVerificationTitle 文字列
このタイトルは Orchestrator に表示されます。
takeScreenshotInCaseOfFailingAssertion Boolean
[ Trueに設定すると、検証に失敗した場合に対象プロセスのスクリーンショットを作成します。
takeScreenshotInCaseOfSucceedingAssertion Boolean
[ Trueに設定すると、検証に成功した場合に対象プロセスのスクリーンショットが作成されます。

戻り値

検証が成功/成功した場合は「True」、検証に失敗した場合は「False」です。

Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.