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