実行オプションのグローバルプロパティ
これらのグローバルプロパティは、Eggplant Functionalを使用してSenseTalkスクリプトを実行する際にテスト対象のシステム(SUT)との対話を決定します。デフォルト値はほとんどの状況に適しています。一般的なSenseTalkのグローバルおよびローカルプロパティもEggplant Functionalスクリプティングで役立つことを覚えておいてください。(例えば、the colorFormatグローバルプロパティ)
以下に説明する実行オプションのプロパティに加えて、SenseTalkにはEggplant Functional用の追加のアプリケーション固有のプロパティが含まれており、これらは一般的にアプリケーションの環境がSenseTalkスクリプトとどのように動作するかに影響を与えます。
これらの値は、Eggplant > Preferencesへ移動してからRunタブを選択することで、Eggplant FunctionalのRun設定の一部として設定することができます。スクリプト内のプロパティの値を変更すると、その実行時間の値が影響を受けますが、アプリケーションの設定で設定された値は変更されません。
ローカルとグローバルのプロパティの一般的な使用については、SenseTalkのローカルとグローバルプロパティを参照してください。
The AdaptiveImageTolerance
Default: 正の数。
Default: 30
Behavior: Adaptive to Image 検索タイプのキャプチャ画像と潜在的な画像マッチとの間の変化に対する感度を調整します。検索許容範囲については、Toleranceを参照してください。
この値を100以上に設定すると、誤陽性のマッチが発生する可能性があります。
例:
set the AdaptiveImageTolerance to 45
The AutoImageUpdateDiagnostics
Value: DynamicTolerance、AlternateTypes、ScalingSearch、DiscrepancySearch、CropEdges、OCRSearch、PriorLocation、OriginalLocation
Default: 実行設定 の 診断 タブの 自動イメージ診断 セクションで設定された値を使用します。ただし、設定パネルで行った変更は、アプリケーションを再起動するまでデフォルト値に反映されないことに注意してください。
Behavior: The AutoImageUpdateDiagnosticsは、Image UpdateパネルのAuto Updateオプションを使用した場合の画像検索に使用される検索診断を決定します。このグローバルプロパティを使用して、特定の検索に必要に応じてスクリプトの実行中の診断を変更することができます。
各検索診断の動作については、Image Diagnostics Selectionsを参照してください。Image Updateパネルについての情報は、The Image Update Panelを参照してください。
例:
set the AutoImageUpdateDiagnostics to(DynamicTolerance, AlternateTypes, ScalingSearch, DiscrepancySearch, CropEdges, OCRSearch, PriorLocation, OriginalLocation)
例:
// グローバルプロパティの現在の設定を変数 'OrigSettings' に格納します
put the AutoImageUpdateDiagnostics into OrigSettings
// Changes the setting for the global property
put the AutoImageUpdateDiagnostics into OrigSettings
click "oContacts" // Performs a search action using the new diagnostics settings
click image:"oContacts"
//変数からグローバルプロパティを元の設定に戻します
set the AutoImageUpdateDiagnostics to OrigSettings
関連項目:
The AutoOCRUpdateDiagnosticsThe ImageUpdateDiagnosticsThe OCRUpdateDiagnostics
The AutoOCRUpdateDiagnostics
Value: CaseSensitive, IgnoreSpaces, TextDifference, ValidCharacters, ValidWords, DPI, Language
Default: Run PreferencesのDiagnosticsタブのAutomatic OCR Diagnosticsセクションで設定された値を使用します。ただし、プリファレンスパネルで行われた変更は、アプリケーションを再起動した後までデフォルト値に反映されないことに注意してください。
Behavior: The AutoOCRUpdateDiagnosticsは、OCR UpdateパネルのAuto Updateオプションを使用した場合のOCRテキスト検索に使用される検索診断を決定します。このグローバルプロパティを使用して、特定の検索に必要に応じてスクリプトの実行中の診断を変更することができます。
各検索診断の動作については、OCR Diagnostics Selectionsを参照してください。OCR Updateパネルについての情報は、The OCR Update Panelを参照してください。
例:
set the AutoOCRUpdateDiagnostics to(CaseSensitive, IgnoreSpaces, TextDifference, ValidCharacters, ValidWords, DPI, Language)
例:
// Stores the current settings of the global property in the variable 'OrigSettings'
put the AutoImageUpdateDiagnostics into OrigSettings
set the AutoOCRUpdateDiagnostics to (CaseSensitive, ValidCharacters)
click text:"Testplant"
// Returns the global property to its original settings from the variable
put the AutoImageUpdateDiagnostics into OrigSettings
関連項目:
The AutoImageUpdateDiagnosticsThe ImageUpdateDiagnosticsThe OCRUpdateDiagnostics
The ForceScreenRefresh
Value: True または False.
Default: False.
Behavior: The ForceScreenRefreshは、各コマンドの後でEggplant Functionalがビューアウィンドウをリフレッシュするかどうかを決定します。
例:
SetOption ForceScreenRefresh, true
the ForceScreenRefreshは、めったに必要ないし、スクリプトの実行を大幅に遅くします。しかし、画面のアーティファクトを大量に生成しているSUTや、VNCサーバーを介してうまく表示されないソフトウェアを実行している場た場合には役立つかもしれません。
The ImageSearchCount
Value: 正の整数。
Default: 7
Behavior: The ImageSearchCountは、Eggplant Functionalがビューアウィンドウをスキャンして画像を探す回数を決定します。WaitForを含む画像検索を行う場合、Eggplant Functionalは自動的にthe ImageSearchDelayをthe ImageSearchCountに従って調整します。また、the ImageSearchTimeグローバルプロパティを使用して、画像またはテキスト(OCR)検索のセクションの検索時間を影響させることもできます。
the ImageSearchCountを1に設定すると、画像検索は現在のビューアウィンドウのみを見て、ImageSearchDelay、画面のリフレッシュ、マウスの再位置決めをバイパスします。この設定は、検索を行う最速の方法ですが、失敗する可能性があります。
WaitForコマンドとWaitForプロパティは、単一の画像検索のために間接的にthe ImageSearchCountを設定するために使用できます。Eggplant Functionalアプリケーションは、the ImageSearchDelayによって指定された頻度で、WaitForによって指定された時間に可能な限り多くのスキャンを適応させます。
例:
SetOption ImageSearchCount, // WaitForを介してimageSearchTimeの上書きを持たない任意の画像検索の画像検索のスキャン回数を3に設定します
SetOption ImageSearchTime, Ist
例:
SetOption ImageSearchCount, 5 // ImageSearchCountを5に設定し、間接的にImageSearchDelayを.36に変更します
SetOption ImageSearchTime, Ist
WaitFor 10, "Dialog" // .36のImageSearchDelayに基づいて、画像を28回スキャンします
WaitFor 10, "SaveDialog"
例:
imageSearchCount の現在の値を変数に格納します
set ISC to the imageSearchCount
// Set the imageSearchDelay to 1
set the imageSearchDelay to 1
// Scans for the image only once per execution of the imagefound() function
repeat until imagefound(image:"Footer")
imagefound() 関数の実行ごとに 1 回だけ画像をスキャンします
repeat until imagefound(image:"Footer")
画像の表示に時間がかかりすぎる場合、繰り返しループを終了したり、実行を終了したり、スクリプトを失敗させたりする方法として、エラー処理を提供します
repeatindex() = 10ならば、"Image not found", "Image not found while scrolling."を投げる
SwipeUp // 画像が見つからない場合、画面を上にスワイプします
end repeat
ImageSearchCount を元の値に戻します
set the imageSearchDelay to 1
例:
WaitFor 0, "Done_Button" // 実行スキャン = (120/the ImageSearchDelay + 1 scans)、最も近い整数に切り捨てます
Click (ImageName: "Done_button", waitFor: 2 minutes)
例:
WaitFor 0, "Done_Button" // 実行スキャン = (10/the ImageSearchDelay + 1 scans)、最も近い整数に切り捨てます
WaitFor 10, "LuckyButton"
waitForの0は、the ImageSearchCountを1に設定する特別な値です。
例:
imagefound() 関数の実行ごとに 1 回だけ画像をスキャンします
repeat until imagefound(image:"Footer")
// 画像が許容可能なイテレーション数後に見つからない場合、リピートループを終了するためのエラーハンドリングを提供します SwipeUpend repeat
repeatindex() = 7ならば、"Image not found", "Image not found while scrolling."を投げる
SwipeUp
end repeat
関連項目:
The ImageSearchDelay
Value: Time (in seconds).
Default: 0.3
例:
Behavior: The ImageSearchDelayは画像を検索する間の待ち時間を決定します。
例:
Set the ImageSearchDelay to .6
例:
Set the imageSearchDelay to // 過渡的な要素の検出を確実にするために、スキャンの頻度を増加させます。Eggplant Functionalはこの頻度でエリアを検索しようとしますが、エリアが大きい場合や画像コレクションを検索している場合など、各スキャンが完了するのを許すように頻度を自動的に調整します。
Set the imageSearchDelay to 0.1
検索領域を画面のサブセットに制限し、imageSearchDelay を低くします
WaitFor 1, (imageName:"RedLight", searchRectangle:("SignalUpperLeft","SignalLowerRight"))
関連項目: