Skip to main content
Version: 23.3

Eggplant Functional Global Properties

The Eggplant Functional global properties pertain to running SenseTalk scripts from the Eggplant Functional application specifically. However, keep in mind that the general SenseTalk global and local properties are also useful in Eggplant Functional scripting. (For example, The ColorFormat global property.)

In addition to the application-specific properties described below, SenseTalk also includes Run Options global properties for Eggplant Functional that pertain to interactions with a system under test (SUT) in the course of a test run.

Many of these global properties appear in the Text and Run preferences in Eggplant Functional (Eggplant > Preferences). Using them as global properties lets you change them on a script-by-script basis, or even multiple times within a single script. 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 CaptureScreenImageFormat Global Property

Values: PNG, JPG, or TIFF

Default: PNG

Behavior: Modifies the image file format used by the CaptureScreen command when capturing screenshots during a test run.

Example:

set the CaptureScreenImageFormat to JPG

The CaptureScreenJPGCompressionQuality Global Property

Values: Integer between 1-100

Default: 100 (no compression; as lossless as possible)

Behavior: Adjusts the compression quality of JPG formatted screenshots captured by the CaptureScreen command. The number indicates the percentage of image quality that is preserved during image compression; 1 being a much lower quality image with a higher amount of image data loss, and 100 meaning that the compression preserves as close to 100% of original quality as possible.

Example:

set the CaptureScreenJPGCompressionQuality to 75 -- Reduces the compression quality, making the file even smaller, but sacrificing some image clarity

The CaptureScreenScaleFactor Global Property

Values: Decimal value between 0 and 1.

Default: 1 (full size)

Behavior: Scales images captured by the CaptureScreen command proportionally. Setting the ScaleFactorForCaptureScreen to .5, for instance, will cut the image dimensions (both height and width) of the screenshot captured in half, before it is saved. So, a 1000x1000 pixel image will be cut to 500x500 px.

note

This functionality is specific to images captured by the CaptureScreen command, and is different from the Scale Factor used with image searching. For more on how to scale captured images for search purposes, see Image Scaling on the Finding Images page, or The ScaleFactors Global Property.

Example:

set the CaptureScreenScaleFactor to .5 -- This will cut the scale of the image in half

The CollectionFilter Global Property

Values: A property list that contains one or both of the properties Name and Description

Default: No filter

Behavior: Limits image searches to those images whose names or descriptions contain the specified string.

note

To set a description for an image, use the image viewer in the suite.

Example:

Set the CollectionFilter to (Name: "English", Description: "release 5.0")

Example:

params SUTOS
If SUTOS is "iOS"
set the CollectionFilter to (Name:"iOS")
else if SUTOS is "Android"
set the CollectionFilter to (Name:"Android")
end if
tip

To reset the CollectionFilter, set the value to empty.

Example:

Set the CollectionFilter to empty

The CommandLineOutput Global Property

Values: True (or On, or Yes), False (or Off, or No)

Default: False

Behavior: The CommandLineOutput controls the output of messages to the standard output stream when a script is run from the Unix or Windows command line:

  • Off: No output is sent to standard output (stdout).
  • On: All of the script output that would appear in the Eggplant Functional graphical interface is sent to the standard output stream.

Example:

Set the CommandLineOutput to On

Example:

SetOption CommandLineOutput, Off
tip

The CommandLineOutput is also available as a runscript command line option.

The CompareScreenAction Global Property

Values: ShowPanel, LogWarning, LogError, or ShowPanelAlways

Abbreviated terms that distinguish between the settings are also allowed: Panel, Warning, Error, or Always

Default: ShowPanel

Behavior: This global property controls the action performed when you run a CompareScreen command. You can use this property to change the behavior within a script run. The available options are:

  • ShowPanel: If a screen difference is detected, the Compare Screen panel opens.
  • LogWarning: If a screen difference is detected, a warning message is entered in the log.
  • LogError: If a screen difference is detected, an error message is entered in the log.
  • ShowPanelAlways: The Compare Screen panel opens regardless of whether any screen difference is detected.

Example:

set the CompareScreenAction to "Always"

Example:

BeginTestCase "Detect Full Screen Differences"
// Set the compare screen global property to not show the panel and log a warning
set the CompareScreenAction to "LogWarning"
Log "Verify the rectangle captured is found as expected before changing it"
click "Contacts" -- To set the tutorialSut back to its default screen
CompareScreen Name:"tutorialSutMenus"
Log "Now let's change the tutorial Sut screen"
Click "Favorites"
Log "...and run CompareScreen again"
CompareScreen Name:"tutorialSutMenus"
EndTestCase "Detect Full Screen Differences"

Related:

The CurrentCharacterCollection Global Property

Values: Empty, or the name of a character collection

Default: Empty

Behavior: This property lets you set a default character collection for image searches that use the character property (i.e., searches intended for a character collection). When you set a value for the currentCharacterCollection, you can omit the characterCollection property from character searches. You can also omit the characterCollection property from a readCharacters function call. Supplying the name of the character collection toreadCharacters or with a characterCollection property overrides the value of the currentCharacterCollection global property.

Example:

set the currentCharacterCollection to "iPhoneCharacters"

Related:

The DefaultCaptureScreenSize Global Property

Values: A list of values representing the width and height of the SUT at time of image capture. Given as (width,height).

Default: Empty

Behavior: The DefaultCaptureScreenSize sets the default screen size of the SUT at time of image capture for any images captured prior to Eggplant Functional v12.20. This is for use with Dynamic Scaling in image searches. For more information see Dynamic Scaling.

Example:

set the DefaultCaptureScreenSize to (1024,768)

The DefaultUseMarkup Global Property

Values: True (or On, or Yes), False (or Off, or No)

Default: False

Behavior: The DefaultUseMarkup determines whether or not supported text markups are recognized in the Text property of a text property list. When the DefaultUseMarkup is set to yes, supported markups are used to format generated text images. When the DefaultUseMarkup is set to no, markups are treated as literal text. (Markups are always treated as literal text for text platforms that use the OCR text engine.)

Example:

set the defaultUseMarkup to No

Example:

setoption DefaultUseMarkup, Yes

The FinalSuites Global Property

Values: One or more suite names

Default: None

Behavior: The FinalSuites global property determines the suite or suites that are searched for script or image resources after the script's own suite is searched. (Suites named in the InitialSuites are searched first, followed by the script's own suite, and then the FinalSuites.)

Example:

Set the FinalSuites to ("FallBack") //Sets the FinalSuites to a suite named "FallBack"

Example:

set the FinalSuites to the folder of SuiteInfo().Path & "common.suite"
note

The FinalSuites/InitialSuites searches the default suite directory for the suite(s) specified with the global property. If the suite(s) are not present in the default suite directory, you must reference the suite by its full file path.

Example:

set the FinalSuites to "C:\AutomationScripts\common.suite"
note

The FinalSuites behaves similarly to helper suites in that both the FinalSuites suites and helper suites are searched after the script's own suites are searched.

The ForceScreenRefresh Global Property

Values: True (or On, or Yes), False (or Off, or No)

Default: False

Behavior: The ForceScreenRefresh determines whether Eggplant Functional refreshes the Viewer window after each command.

note

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.

Example:

SetOption ForceScreenRefresh, true

The HotSpotScaling Global Property

Values: Inner, All, or None

Default: Inner

Behavior: This property determines whether image hot spots are scaled when you search for a scaled image. The values are as follows:

  • Inner: If a hot spot is within the searchable pixels of an image, it is scaled with the image. If the hot spot is offset from the image, it is not scaled.
  • All: Hot spots are always scaled proportionally when you search for a scaled image.
  • None: Hot spots are not scaled when you search for a scaled image.

Example:

Set HotSpotScaling to None

Example:

params SUTType
If SUTType is "mobile" then set the HotSpotScaling to All //Sets the HotSpotScaling to All if "mobile" is passed in as the SUTType parameter value
tip

The HotSpotScaling is particularly relevant when performing image scaling, which is commonly used in cross-mobile testing.

The ImageUpdate Global Property

Values: Auto, Manual, or Off

Default: Manual

Behavior: The ImageUpdate global property determines how the Image Update panel and OCR Update panel behave during script execution:

  • Auto: The Image Update and OCR Update automatically attempt to correct image and OCR failures and continue the script execution. The initial image or OCR failure is logged as a warning and any corrective action is also logged as a warning. Changes are cached but not committed until the script is updated (OCR) or the change is applied (images) using the Action drop-down list in the Results for the particular script run.
  • Manual: The Image Update panel and OCR Update panel open when an image or OCR search fails; you can choose to proceed with a corrected image or OCR search, or allow the script to fail. The amount of time the Update panel remains open is adjustable on the System Pane of the Run Option preferences in Eggplant Functional. Manual is effective only when you are running scripts in the Eggplant Functional GUI.
  • Off: The Image Update panel and OCR Update panel are not used during script execution. This allows scripts to fail more quickly in the event that an image or OCR search is unsuccessful.

Example:

Set the ImageUpdate to Manual

Example:

SetOption ImageUpdate, Off

Related:

  • the ValidateImageFound
note

This command is used in place of the ImageDoctor global property, which is deprecated.

The InitialSuites Global Property

Values: One or more suite names

Default: None

Behavior: The InitialSuites global property determines the first suite or suites that are searched for script or image resources called by the current script. (Suites named in the InitialSuites take precedence over the calling script's own suite.)

Example:

Set the InitialSuites to ("Windows8Common", "Windows8Calculator")

Example:

Params SUTModel
if SUTModel contains "iPhone" or SUTModel contains "iPad" then
set the initialsuites to "NopCommerceiOS.suite"
else
set the initialSuites to "NopCommerceAndroid.suite"
end if
note

The InitialSuites/FinalSuites searches the default suite directory for the suite(s) specified with the global property. If the suite(s) are not present in the default suite directory, you must reference the suite by its full file path.

Example:

set the InitialSuites to "C:\AutomationScripts\NopCommerceAndroid.suite"

The OpenTestCases Global Property

Values: A property list of results property lists. For example:

(@"Login.script":(Errors:"0", Exceptions:"0", StartTime:"2016-10-10 16:02:20 -0600", Successes:"0", TestCase:"Login.script", Warnings:"0"), WelcomeLoadTime:(Errors:"0", Exceptions:"0", StartTime:"2016-10-10 16:02:20 -0600", Successes:"0", TestCase:"WelcomeLoadTime", Warnings:"0"))

Default: Empty

Behavior: The OpenTestCases global property is used to access information gathered up until that point by all open test cases (see The BeginTestCase and EndTestCase Commands for information about what a test case is).

note

The initial handler (the script itself) is considered a test case and will be reported as one by the OpenTestCases global property. If no declared test cases are open, the script (initial handler) will be reported as the only open test case.

Example:

BeginTestCase "WelcomeLoadTime"
//Execute some actions
log the OpenTestCases //Accesses information about the current test cases
//Execute further actions if desired
EndTestCase "WelcomeLoadTime"
log the result //Logs the results property list for the test case after it has ended
tip

The result property list created by a test case can be accessed after the test case has been closed by using the result. This action must be done immediately following the EndTestCase command that closes the case, as shown in the example above.

The MultipleFoundAction Global Property

Values: UseFirstLocation, ShowPanel, LogWarning, or ThrowException. These values can be abbreviated as First, Panel, Log, and Throw, respectively.

Behavior: Can be used at runtime to override the setting set in Run > Image Update > When Multiple Occurrences Are Found.

Example:

set the MultipleFoundAction to LogWarning

The ReadTextSettings Global Property

Values: A property list

Behavior: The ReadTextSettings is a property list of the default settings used for the ReadText() and ReadTable() functions.

Example:

Set the readTextSettings to (dpi:96, multiLine: off)

Example:

set Characters to "A".."Z" &&& "a".."z" &&& comma // Stores all uppercase and lower case letters as well as , as a list into a variable
set the readTextSettings to (validCharacters:Characters) // Uses the list inside Characters to indicate the ValidCharacters

Example:

if param(1) is "Phone" then // Param(1) refers to the first parameter value passed into the script
set the ReadTextSettings to (DPI:200)
set the HotSpotScaling to all
set the defaultScale to .5
end if
log readText("StatusUpperLeft","StatusLowerRight") //This and subsequent readText and readTable functions will use dpi:200

The RemoteClipboard Global Property

Values: Contents of the remote clipboard

Default: None

Behavior: The RemoteClipboard provides access to the clipboard of the SUT. By modifying this global property, you change the contents of the SUT’s clipboard.

Example:

setOption RemoteClipboard, "Hello"

Example:

set the remoteclipboard to "www.google.com"
Tap "AddressBar"
mousebuttondown 1 // Holds down the left mouse button (a press on mobile), at the location where the preceding tap occurred
wait 2
mousebuttonup 1 // Releases the left mouse button/press
Tap "PasteDialog"
tip

You can view the content of the SUT's clipboard with the RemoteClipboard() function.

tip

The SetRemoteClipboard command provides an alternate method to modify the SUT’s clipboard.

The RepositionPoint Global Property

Values: One pair of screen coordinates

Default: A dynamic point near the lower-right corner of the SUT

Behavior: The RepositionPoint determines where the mouse is repositioned during image searches when the ShouldRepositionMouse is set to On.

Positive coordinate values are relative to the top left corner of the screen; negative coordinate values are relative to the bottom right corner of the screen. (See also the ShouldRepositionMouse.)

Example:

SetOption RepositionPoint, (1280, 1024)

Example:

// Use code like this to force the mouse cursor to automatically move to a position where mouse-over effects won't obscure elements of interest
Click "AccountDetailsMenuButton"
set the ShouldRepositionMouse to true // Causes the mouse cursor position to automatically move to the RepositionPoint in the event that the first scan of the WaitFor image search below is unsuccessful
set the RepositionPoint to the remoteScreenSize * (.25,.75) // Sets the RepositionPoint one quarter width across and three quarters height down from the top left corner of the SUT
WaitFor 10, "AccountDetailsSummary"
set the ShouldRepositionMouse to false
tip

On Windows, moving the cursor to the lower-right corner of the screen triggers a feature called Peek, which lets you temporarily view the desktop and generally disrupts automation. Changing the RepositionPoint outside of the Peek trigger area, setting the ShouldRepositionMouse to off, or disabling Peek in Windows is necessary to prevent disruption due to the Peek feature.

The SaveRunLogOutput Global Property

Value: True (or On, or Yes), False (or Off, or No)

Default: False

Behavior: The SaveRunLogOutput determines whether the run log output from the execution is saved as file RunLogOutput.txt into the results folder for the execution. The default behavior is that the run log is not saved and no file is created.

Example:

SetOption SaveRunLogOutput, true

Example:

Set the saveRunLogOutput to yes // Allows output that appears in the run log but not in logfile.txt, such as put commands, to be saved into a separate file
Set the scriptTracing to yes // Allows additional information to appear in the run log, including entries for entering and exiting handlers
RunWithNewResults "TestCase_BuyItem"
tip

The additional information created by the ScriptTracing and saved by the SaveRunLogOutput can be useful for script debugging purposes.

note

Because the SaveRunLogOutput saves the logging content of the Run window, you must run Eggplant Functional from the GUI to use this feature.

The ScaleFactors Global Property

note

Notes: The ScaleFactors global property was previously known as the DefaultScale. As of Eggplant Functional 19.2, this property can be set at the suite level, by going to the suite Settings tab.

Values: A positive number, a list of positive numbers, a range of positive numbers, or a combination of the above. If a range is provided, “stepping by” or simply “by” can be added to the list, followed by a number to indicate the increment to be used as Eggplant increases the scale of its search over the given range. To learn more about how to use ranges in SenseTalk, see Ranges.

Default: Empty (effectively 1.0)

Behavior: The scaleFactors global property sets the scale at which Eggplant Functional searches for an image, relative to its original capture size. This global property is overridden by in-line scale settings but takes precedence over values defined in the Scale Factors for Image Search field in the suite Settings, as well as over scales defined with a saved image (seen in the Image Viewer). Eggplant searches for a given image at each scale provided to this property, in the order they are listed. It also searches for the image at various sizes within a given range, increasing its search size by the increment provided. To read about in-line scale setting, see Image Scaling.

Example:

Set the scaleFactors to .5 // Scales all images to half of their original size

Example:

Set the scaleFactors to (.5,1.0,1.5) // Scales images by every number in the list

Example:

Set the scaleFactors to (.5to1.5by.25) // Scales images by every number within the .5 to 1.5 range incrementing by .25 (.5,.75,1.0,1.25,1.5)

Example:

params SUTFormFactor
If SUTFormFactor is "Phone" then set the scaleFactors to (.75,.9) // Sets the default scale to .75 and .9 only if parameter value "Phone" is passed into the script, otherwise a scale of 1.0 is used
tip

Performing image searches at scales of less than one generally gives better results, so we recommend capturing the largest version of the image and scaling down.

tip

Searching for images at additional scales increases script execution time, so include additional scales thoughtfully.

The ScriptAnimation Global Property

Values: All (or true), Off (or false), or Calls

Default: Off.

Behavior: The ScriptAnimation determines whether a script is animated (highlighted line-by-line in the Run window) as it runs, as follows:

  • All or true: Each line of the script is highlighted as it is executed.
  • Off or false: The script is not animated.
  • Calls: Each script or handler is highlighted, but not each line.
note

The ScriptAnimation has an effect only when using Eggplant Functional in GUI-mode.

Example:

Set the ScriptAnimation to Calls

Example:

SetOption ScriptAnimation, All

The ScriptLogging Global Property

Values: On (or true), Actions, off (or false), minimal, or silent

Default: On.

Behavior: The ScriptLogging controls which events are recorded in the log file as a script runs, as follows:

  • On: All logging commands and all interactions with the SUT are recorded.
  • Actions: All logging commands and all interactions with the SUT, with the exception of global property changes, are recorded.
  • Off: Only BeginTestCase, EndTestCaseLog, LogError, LogWarning, and LogSuccess, commands are recorded.
  • Minimal: Only LogError, LogSuccess, and LogWarning commands are recorded.
  • Silent: Nothing is recorded in the log file, but warnings and errors are still counted.

Example:

SetOption Scriptlogging, On

Example:

Use code like this to prevent your password from appearing in plain text:

params Password
Click "PasswordField"
TypeText UserName
Set the scriptlogging to Silent// Prevents all logging
TypeText Password
Set the scriptlogging to On// Returns logging to the default behavior
Log "The password was typed!"

Example:

Use code like this to limit the amount of repetitive logging that appears when working with a repeat loop:

set the scriptLogging to off // Sets the scriptLogging to off, which allows log messages to appear in the logging
Log "Advancing until the setup wizard is finished."
repeat until imagefound("FinishedButton")
Click "nextButton"
end repeat
set the scriptLogging to on

Related:

The ScriptTracing Global Property

Values: All (or true), Off (or false), or Calls

Default: Off.

Behavior: The ScriptTracing determines whether or not a script is traced (displayed line-by-line in the Run window, one step ahead of actual execution) as it runs. For example:

put "hello" into var

log var

10/10/16, 12:06:57 PM Log hello

<<< 12:06:57 End handler 1: Login (normal exit)

The values are described below:

  • All or true: Each line of the script is displayed before it is executed.
  • Off or false: The script is not traced.
  • Calls: Each script or handler is traced, but not each line.
note

The ScriptTracing reverts to its default value upon completion of the script execution.

Example:

Set the ScriptTracing to Off

Example:

SetOption ScriptTracing, Calls
note

The ScriptTracing has an effect only in Eggplant Functional GUI-mode, unless The SaveRunLogOutput is also set to on.

The SearchRectangle Global Property

Values: Two image locations or two pairs of coordinates indicating diagonal corners of the search rectangle. Regardless of the form you pass in, the return value is displayed as (x,y,x,y).

Default: The full screen of the SUT.

Behavior: This property lets you limit the area that Eggplant Functional searches for images on the SUT.

tip

To reset the search rectangle to the full SUT screen, set the value to empty, (), or fullscreen.

Example:

setoption SearchRectangle, ("DialogUpperLeft",imageLocation("DialogLowerRight") + (50,10)) // Sets the searchRectangle based on the hot spot location of DialogUpperLeft, and an adjustment of 50 pixels to the right and 10 pixels down from the hot spot location of DialogLowerRight

Example:

Use code like this to detect flashing or transient UI elements. This code rapidly searches for each of the two states in which an indicator can be and confirms both are present. This code confirms that the states alternate more than once, which ensures the indicator is flashing.

Set the SearchRectangle to ("TopLeftFieldBorder", "BottomRightFieldBorder") //Limits the search area to only where the flashing element appears. This can make increasing the scan frequency possible, as scanning a smaller portion of the screen takes less time.
Set the imageSearchDelay to 0.1 // Increases the frequency of the scans to ensure detection of transient elements. Eggplant will attempt to search the area at this frequency, but if the area is large or you are searching for an image collection, etc., Eggplant will automatically adjust the frequency to allow enough time for each scan to complete.
repeat 2 times // Checks for each state of the element twice to ensure the state has changed more than once.
WaitFor 1, "GreyElement" // The imageSearchTime of 1 second for the WaitFor, combined with the imageSearchDelay of .1 second, will accommodate up to 10 scans for the image.
WaitFor 1, "RedElement"
end repeat
set the SearchRectangle to empty //Sets the searchRectangle back to full screen
set the ImageSearchDelay to 0.3

Example:

Use code like this to detect flashing or transient UI elements

Put imageLocation("OutputUpperLeft") into UL // Before triggering the transient element to appear, store the locations of the images that define the searchRectangle into variables, so that setting the searchRectangle has no search time overhead
Put imageLocation("OutputLowerRight") into LR
Click "ConfirmButton" // Clicks the image that causes the transient element to appear
Set the searchRectangle to (UL,LR) // Sets the searchRectangle based on the stored coordinate locations in variables UL and LR
WaitFor 10, "ConfirmationIcon"
Click "OKButton"
set the searchRectangle to () // Sets the searchRectangle back to full screen

The SuiteVariables Global Property

Values: A property list containing user-defined variable names (keys) and values

Default: Empty

Behavior: This property lets you set suite-wide variables in Eggplant Functional that can be used in any context. For example, they can be used in SenseTalk scripts but they can also be used in API testing to substitute URL strings or user credentials. Variables stored as part of the suiteVariables property have a value immediately when a run context begins so the value does not have to be assigned as part of the runtime.

Suite variables are a special, user-defined type of predefined variable. These variables are local in scope, but their values persist in the suite so that they are available across sessions. You can change the value of a variable during a script run by accessing or operating directly on the variable. Such changes don't affect the variable's value stored in the suiteVariables.

note

In addition to the usual methods of working with global properties in SenseTalk, you can set or edit these variables in the Suite Variables section of the Egglant Functional Settings tab. For information about using this method, see Creating and Using Suite Variables.

Example:

set the suitevariables to (usr1:"bobboson", usr15:"alicealison", pass1:"bob", pass15:"alice")

Example:

set the suitevariables.myURL to "www.google.com"

Related:

The TextStyle Global Property

Values: The name of a saved text style (a property list of text style options)

Default: The Default text style defined in the Eggplant Functional Text Preferences.

Behavior: This property controls the default option settings for text searches. The textStyle can be set to refer to any of the styles set up in Text preferences by setting it to that style's name (instead of Default). If you set the textStyle to a name that doesn't match any of the defined style names, it reverts to the Default style.

You can also set the textStyle directly to a property list of option settings. In that case, those settings are used for text searches, but the textStyle is treated as independent from any of the styles defined in the Text Preferences.

Example:

set the textstyle to "Android"

Example:

set the textstyle.caseSensitive to yes

Example:

set the textstyle to (language:"German", caseSensitive:Yes) -- Not associated with any named style

Related:

The UsabilityMode Global Property

Values: True (or on or yes), False (or off or no)

Default: False

Behavior: The usabilityMode global property determines whether Eggplant Functional runs scripts in Usability Mode. You can change this setting dynamically within a script to apply to only sections of a script run, and you can turn off Usability Mode with this property even if you started a script in Usability Mode from the UI.

For complete information about Usability Mode, see Running Eggplant Functional Tests in Usability Mode.

Example:

set the usabilityMode to true // Turns on Usability Mode during a script run

Example

Run in Usability Mode for a portion of a script:

Click "Web Bowser Icon"
WaitFor 3.5, "Refresh Icon"
Click Image:"Magnifying Glass"

set the usabilityMode to True // Turns on Usability Mode

TypeText "www.eggplant.io"
TypeText returnKey
WaitFor 5.0, "Eggplant Logo"
WaitFor 3.5, "Refresh Icon"

set the usabilityMode to False // Turns off Usability Mode

Related:

The Usability\_DelayToCheckForFeedback Global Property

Values: A time value.

Default: 0.5 seconds (or the value you have set on the Usability tab of Eggplant Preferences)

Behavior: When you run scripts in Usability Mode, this property sets the amount of time that Eggplant Functional waits after a click or tap action before checking for screen changes for the visual feedback usability test.

For complete information about Usability Mode, see Running Eggplant Functional Tests in Usability Mode.

Example:

set the usability_delayToCheckForFeedback to 3 // Changes the value of the property to 3 seconds

Example:

set TimeVar to 5 seconds
set the usability_delayToCheckForFeedback to TimeVar // Uses a variable from the script to set a value for the delay

Related:

The usability\_delayToCheckForImageMovement Global Property

Values: A time value.

Default: 0.7 seconds (or the value you have set on the Usability tab of Eggplant Preferences)

Behavior: When you run scripts in Usability Mode, this property determines the delay between image checks for the moving targets usability test. For complete information about Usability Mode, see Running Eggplant Functional Tests in Usability Mode.

Example:

set the usability_delayToCheckForImageMovement to 4 // Changes the value of the property to 4 seconds

Example:

Changes the value of the delay for a portion of the script, then returns to the original value:

put the usability_delayToCheckForImageMovement into origDelay // Puts the original value of the property into a variable
set the usability_delayToCheckForImageMovement to 3 seconds // Sets a new value for the delay

Click "Start"
Click "Web Bowser Icon"
WaitFor 3.5, "Refresh Icon"
Click Image:"Magnifying Glass"

set the usability_delayToCheckForImageMovement to origDelay // Returns delay value back to its original

Related:

The Usability\_FeedbackSensitivity Global Property

Values: A number in the range 1–1000

Default: 10 (or the value you have set on the Usability tab of Eggplant Preferences)

Behavior: When you run scripts in Usability Mode, the usability_feedbackSensitivity global property determines how much the screen has to change to pass the visual feedback check, which expects the screen to change. The higher the sensitivity setting, the less the screen needs to change.

For complete information about Usability Mode, see Running Eggplant Functional Tests in Usability Mode.

Example:

set the usability_feedbackSensitivity to 100 // Increases the sensitivity so that smaller changes can be detected as a change

Related:

The Usability\_LoadTimeWarning Global Property

Values: A time value.

Default: 3 seconds (or the value you have set on the Usability tab of Eggplant Preferences)

Behavior: When you run scripts in Usability Mode, this property determines the acceptable length of time for images and text to load. If the load time is above the designated threshold, a warning displays in the log.

For complete information about Usability Mode, see Running Eggplant Functional Tests in Usability Mode.

Example:

set the usability_LoadTimeWarning to 5 // Changes the value of the property to 5 seconds

Related:

The Usability\_TimeBetweenForbiddenCheck Global Property

Values: A time value.

Default: 0.5 seconds (or the value you have set on the Usability tab of Eggplant Preferences)

Behavior: When you run scripts in Usability Mode and have the forbidden images and text test enabled, this property sets the minimum time Eggplant Functional allows between runs of this usability test.

For complete information about Usability Mode, see Running Eggplant Functional Tests in Usability Mode.

Example:

set the usability_timeBetweenForbiddenCheck to 3 // Changes the value of the property to 3 seconds

Related:

The ValidateImageFound Global Property

Values: On (or true or yes), Off (or false or no), or Always

Default: Off

note

You can change the default value from Off to On. On the Eggplant Functional main menu, go to Run > Image Update, then select Validate ImageFound. As long as this option is selected in the UI, the default for the ValidateImageFound property is On.

Description: When the ImageFound function returns false, the ValidateImageFound can trigger Auto Update. The values are described below:

  • On (or true or yes): Opens the Image Update panel when ImageFound returns false, but not if Auto Update is selected.
  • Off (or false or no): Doesn't open the Image Update panel when ImageFound returns false.
  • Always: Opens the Image Update panel when ImageFound returns false, even if Auto Update is selected.

Example:

params DebuggingMode // You would pass in true or false for this parameter
if RunningFromCommandLine() and DebuggingMode then // Checks for both RunningFromCommandLine and DebuggingMode to equal "true"
set the ImageUpdate to "Auto" // Sets the ImageUpdate global property to Auto; allows automatic caching of image/OCR updates if there is a matching diagnostic for ImageNotFound
SetOption ValidateImagefound, true
end if

Related:

The ValidateSuccessfulSearches Global Property

Value: Boolean. True (or On, or Yes), False (or Off, or No)

Default: False

note

You can toggle the default value from the Eggplant Functional main menu. Navigate to Run > Image Update, then select Validate Successful . As long as this option is selected in the UI, the default for the ValidateImageFound property is On.

Description: When a script contains an imageFound function, such as ImageFound(<image_name>), and the text or image specified is successfully found, the Image Update panel is displayed with the validation message "Validate Image Found". Validating successful image searches can be useful in the rare situation where you need to verify that Eggplant Functional is finding the correct image. For instance, you can use Validate Successful Image Searches to review your application if visual elements are updated to match new UI elements, to make sure the script isn't still finding matches for old images.

Example:

Set the ValidateSuccessfulSearches to On -- Turns this property on, so that the Imge Update panel will appear when ImageFound functions return True.

The CurrentTextPlatform Global Property (Deprecated)

note

This global property is deprecated. See the Text Preferences in Eggplant Functional to set the text style.

Values: The name of a text platform defined in Text preferences

Default: Set in Text preferences

Behavior: The CurrentTextPlatform determines the text platform that is used by a script.

note

This global property displays only the name of the current platform by default, but it is still a property list. You can assign values to the CurrentTextPlatform keys just as you can with the TextPlatforms global property.

Example:

SetOption CurrentTextPlatform, "WinXP"

Example:

set CurrentTextPlatform.generator to "native"

Related:

The DefaultTextStyle Global Property (Deprecated)

Values: A text-style property list

Default: The default text style of the current platform

Behavior: The DefaultTextStyle is a shortcut to the default text style for the current text platform.

Example:

set the defaultTextStyle.TextFont to "Helvetica"

Example:

setoption DefaultTextStyle, "StyleOne"

The ImageDoctor Global Property (Deprecated)

note

This property is now deprecated. Use The ImageUpdate instead.

Value: Auto, Manual, or Off

Default: Manual

Description: The ImageDoctor global property determines how the Image Doctor works during script execution.

  • Auto: The Image Doctor automatically attempts to correct image failures and continue the script execution. (The initial image failure is logged as a warning.)
  • Manual: The Image Doctor panel opens when an image fails; you can choose to proceed with a corrected image, or allow the script to fail.
  • Off: The Image Doctor is not used during script execution.