activities
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
UiPath logo, featuring letters U and I in white

ワークフローのアクティビティ

最終更新日時 2026年3月9日

VerifyRange

式が指定した範囲内にあるかどうかを検証します。

定義

名前空間: UiPath.Testing.API

アセンブリ: UiPath.Testing.Activities.API (UiPath 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 String : 出力メッセージの形式。次の引数がサポートされています。

  • {Expression}
  • {ExpressionText}
  • {Operator}
  • {LowerLimit}
  • {LowerLimitText}
  • {UpperLimit}
  • {UpperLimitText}
  • {Result}

詳しくは、「outputMessageFormatを設定する」をご覧ください。

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 String : 出力メッセージの形式。次の引数がサポートされています。

  • {Expression}
  • {ExpressionText}
  • {Operator}
  • {LowerLimit}
  • {LowerLimitText}
  • {UpperLimit}
  • {UpperLimitText}
  • {Result}

詳しくは、「outputMessageFormatを設定する」をご覧ください。

continueOnFailure Boolean : アクティビティでエラーが発生した場合でも、オートメーションを継続するかどうかを指定します。既定値は False です。そのため、フィールドが空白でエラーが発生すると、プロジェクトの実行が停止します。値を True に設定すると、プロジェクトの実行はエラーに関係なく継続されます。

alternativeVerificationTitle文字列 : Orchestrator に表示されます。

takeScreenshotInCaseOfFailingAssertion ブール 値: Trueに設定すると、検証に失敗した場合に対象プロセスのスクリーンショットを作成します。

takeScreenshotInCaseOfSucceedingAssertion ブール 値: Trueに設定すると、検証に成功した場合に対象プロセスのスクリーンショットを作成します。

戻り値

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

設定: outputMessageFormat

outputMessageFormat パラメーターは、検証操作で使用される値のプレースホルダーとして機能する、サポートされている引数を使用して設定できます。これらのプレースホルダーには、実行時にコード化されたオートメーション API を呼び出すときに定義した変数または値が自動的に入力されます。

コード化されたオートメーション API「VerifyRange」では、サポートされている次の引数を出力メッセージの作成時に実装できます。

  • {Expression}: expression パラメーターに指定した式の値を表します。
  • {ExpressionText}: expression パラメーターに挿入した式のテキストを表します。
  • {Operator}: verificationType パラメーターに対応します。
  • {LowerLimit}: lowerLimit パラメーターに使用された変数名を示します。
  • {LowerLimitText}: lowerLimit パラメーターに使用される変数のテキスト表現を示します。
  • {UpperLimit}: upperLimit パラメーターに使用された変数名を示します。
  • {UpperLimitText}: upperLimit パラメーターに使用される変数のテキストの値を示します。
  • {Result}: 検証結果であるコード化されたオートメーション API の戻り値を表します。

以下は、outputMessageFormat パラメーターの設定を含む、コード化されたオートメーション API「VerifyRange」の使用方法の例です。

// Initialize a variable for the expression to be verified
var Expression1 = 23;

// Employ the VerifyRange coded automation API, with the last string parameter being the outputMessageFormat
testing.VerifyRange(Expression1, VerificationType.IsWithin, 1, 25, "The {Expression} should be greater than {LowerLimitText}, and less than {UpperLimitText}");
// Initialize a variable for the expression to be verified
var Expression1 = 23;

// Employ the VerifyRange coded automation API, with the last string parameter being the outputMessageFormat
testing.VerifyRange(Expression1, VerificationType.IsWithin, 1, 25, "The {Expression} should be greater than {LowerLimitText}, and less than {UpperLimitText}");

この例では、中括弧内のプレースホルダーが実行時に対応する変数名とその値に置き換えられ、カスタマイズされた出力メッセージが提供されます。

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得