Run Options Global Properties
These global properties determine interactions with the system under test (SUT) when you run SenseTalk scripts with Eggplant Functional. The default values are appropriate for most situations. Keep in mind that the general SenseTalk global and local properties can also be useful in Eggplant Functional scripting. (For example, the colorFormat
global property.)
In addition to the run options properties described below, SenseTalk includes additional application-specific properties for Eggplant Functional that generally affect how the application environment works with SenseTalk scripts.
Note that these values can be set as part of the Eggplant Functional Run preferences by going to Eggplant > Preferences, then selecting the Run tab. Changing the value of a property within a script affects that value for that runtime, but does not change the value set in the application preferences.
For general information about using local and global properties, see Local and Global Properties in SenseTalk.
The AdaptiveImageTolerance
Values: A positive number.
Default: 30
Behavior: Adjusts the Adaptive to Image search type's sensitivity to change between the captured image and potential image match. For more on search tolerance, see Tolerance.
Setting this value to 100 or more is likely to result in false-positive matches.
Example:
set the AdaptiveImageTolerance to 45
The AutoImageUpdateDiagnostics
Value: DynamicTolerance
, AlternateTypes
, ScalingSearch
, DiscrepancySearch
, CropEdges
, OCRSearch
, PriorLocation
, OriginalLocation
Default: Uses the values as set in the Automatic Image Diagnostics section of the Diagnostics tab of Run Preferences. Note, however, that changes made in the preferences panel won't be reflected in the default value until after you restart the application.
Behavior: The AutoImageUpdateDiagnostics
determines which search diagnostics are used for image searches when you use the Auto Update option for the Image Update panel. You can use this global property to change the diagnostics within a script run for specific searches, as required.
For information about how each search diagnostic works, see Image Diagnostics Selections. For information about the Image Update panel, see The Image Update Panel.
Example:
set the AutoImageUpdateDiagnostics to (DynamicTolerance, AlternateTypes, ScalingSearch, DiscrepancySearch, CropEdges, OCRSearch, PriorLocation, OriginalLocation)
Example:
// Stores the current settings of the global property in the variable 'OrigSettings'
put the AutoImageUpdateDiagnostics into OrigSettings
// Changes the setting for the global property
set the AutoImageUpdateDiagnostics to (OriginalLocation)
// Performs a search action using the new diagnostics settings
click image:"oContacts"
// Returns the global property to its original settings from the variable
set the AutoImageUpdateDiagnostics to OrigSettings
Related:
The AutoOCRUpdateDiagnostics
The ImageUpdateDiagnostics
The OCRUpdateDiagnostics
The AutoOCRUpdateDiagnostics
Value: CaseSensitive
, IgnoreSpaces
, TextDifference
, ValidCharacters
, ValidWords
, DPI
, Language
Default: Uses the values as set in the Automatic OCR Diagnostics section of the Diagnostics tab of Run Preferences. Note, however, that changes made in the preferences panel won't be reflected in the default value until after you restart the application.
Behavior: The AutoOCRUpdateDiagnostics
determines which search diagnostics are used for OCR text searches when you use the Auto Update option for the OCR Update panel. You can use this global property to change the diagnostics within a script run for specific searches, as required.
For information about how each search diagnostic works, see OCR Diagnostics Selections. For information about the OCR Update panel, see The OCR Update Panel.
Example:
set the AutoOCRUpdateDiagnostics to (CaseSensitive, IgnoreSpaces, TextDifference, ValidCharacters, ValidWords, DPI, Language)
Example:
// Stores the current settings of the global property in the variable 'OrigSettings'
put the AutoOCRUpdateDiagnostics into OrigSettings
set the AutoOCRUpdateDiagnostics to (CaseSensitive, ValidCharacters)
click text:"Testplant"
// Returns the global property to its original settings from the variable
set the AutoOCRUpdateDiagnostics to OrigSettings
Related:
The AutoImageUpdateDiagnostics
The ImageUpdateDiagnostics
The OCRUpdateDiagnostics
The ForceScreenRefresh
Value: True or False.
Default: False.
Behavior: The ForceScreenRefresh
determines whether Eggplant Functional refreshes the Viewer window after each command.
Example:
SetOption ForceScreenRefresh, true
the ForceScreenRefresh
is rarely necessary, and dramatically slows down script execution. However, it might be helpful with a SUT that is generating a lot of screen artifacts or running software that does not display well through the VNC server.
The ImageSearchCount
Value: A positive integer.
Default: 7
Behavior: The ImageSearchCount
determines the number of times Eggplant Functional scans the Viewer window searching for an image. When performing an image search that includes a WaitFor
, Eggplant Functional automatically adjusts the ImageSearchDelay
according to the ImageSearchCount
. You can also use the ImageSearchTime
Global Property to affect the search time for a section of image or text (OCR) searches.
Setting the ImageSearchCount
to 1 causes image searches to look at only the current Viewer window, bypassing any ImageSearchDelay
, screen refreshes, and mouse repositioning. This setting is the fastest way to perform a search, but it can be prone to failure.
The WaitFor
command and WaitFor
property can be used to set the ImageSearchCount
indirectly for a single image search. The Eggplant Functional application fits as many scans as possible into the time specified by the WaitFor
, at the frequency specified by the ImageSearchDelay
.
Example:
// Sets the number of scans in the image search to 3 for any image searches that do not have an imageSearchTime override through WaitFor
SetOption ImageSearchCount, 3