on error action

エラーが発生した場合に実行されるアクションを指定します。
名前説明タイプ修飾子
action

エラーや警告が発生した場合に実行されるアクションの名前です。

Stringなし
argument<数>

(任意)アクション引数で指定されたアクションに渡す引数です。

Stringなし
なし
このアクションは、次のプロジェクト項目で使用できます: テストモジュールおよびユーザー定義アクションです。
次の設定はこのアクションに適用可能です:  remove double quotes from cells.
例・ケース1: エラー処理アクションには引数がありません
アクションライン
TestArchitect で、以下のサンプルスクリプトを使用して、「error handler」という名前のユーザー定義アクションを作成します
        
image location
capture screenD:\画像\error_img.jpg
アクション 'on error action' の引数 action に、ユーザー定義アクション "error handler "を入力します。これでスクリプトは実行中にエラーが発生したときにアクション error handler を呼び出します
Initial
        
level
set notice level0
 
action
on error actionerror handler
 
config
 
start application
Test case: TC 01、'on error action' が未定義のコントロールに対して正しく動作します
        
window
check window existsログイン
 
windowcontrol
clickログインサインアップ
結果
例・ケース2: エラー処理アクションには引数があります
TestArchitect で、以下のサンプルスクリプトを使用して、「error handler」という名前のユーザー定義アクションを作成します。
        
name
argumentargument1
argumentargument2
 
text
report#argument1
report#argument2
アクション 'on error action' の引数 action に、ユーザー定義アクション "error handler "を入力します。これでスクリプトは実行中にエラーが発生したときにアクション error handler を呼び出します
Initial
        
actionargument1argument2
on error actionerror handler第1引数の値です第2引数の値です
Test case:TC 01、'on error action' が未定義の高レベルアクションと正しく動作します
        
force error
結果
  • 任意の引数の数は、アクションで指定されたアクションの要件に依存します。
  • このアクションは修飾子 <ignore> をサポートしています。文字列 <ignore> が引数の値として現在する場合、または引数に <ignore> と評価する式を含まれている場合はアクションが実行中にスキップされます。

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGearはLogiGear Corporationの登録商標であり、Action Based TestingおよびTestArchitectはLogiGear Corporationの商標です。ここに記載されているその他の商標は、各所有者の財産です。

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400