NeoLoad provides a set of ready-to-use Citrix Actions. They are available in the Actions panel.
Connect
This Action opens a new Citrix connection. The established connection is contextual to the User Path and will be used to perform all the other actions.
Parameters
serverAddress (required): The Citrix Server Address, a FQDN or an IP.
domain (required): The Active Directory Domain for Users.
username (required): The username in the Active Directory, must be different for each Virtual User instance.
password (required): The password associated with the username in the Active Directory Domain.
windowSize (required): Size of the Citrix Client Window. The format is "width*height" like "800*600". Default value is "800*600".
application (optional): The application name in the case of Citrix Virtual Apps.
clientName (optional): The client name.
properties.<propertyName> (optional): Any <propertyName> associated with <propertyValue> that must be set to the ICA Client before connection.
connectTimeoutInMs (required): Maximum timeout in milliseconds to wait for connecting and login to the server. Default value is "180000".
ocrDataPath (optional): In case you want to do OCR in a non-English language, download the file from https://github.com/tesseract-ocr/tessdata_fast, put it into <yourproject>/custom-resources folder and name it like "fra.traineddata".
useCacheForHashes (optional): For heavy load and SHA2/OCR strong usage, you may try to use cache in order to reduce disk/cpu consumption. Default value is "false".
noGuiMode (optional): Set to "false" to force to display GUI, even while running a test. Default value is "true".
colorDepth (optional): Preferred color depth for a session: [Color16, Color256, Color16Bit, Color24Bit].
encryptionLevelSession (optional): The encryption level of the ICA connection [Basic, EncRC5-0, EncRC5-40, EncRC5-56, EncRC5-128].
connectMode (optional): The connection mode, either as one single step in mode "CONNECT_AND_LOGON" or in two steps mode, first "CONNECT", then "LOGON.
Example
Connection to a CITRIX server:
serverAddress: citrixServer
domain: CitrixAD
username: myusername
Password: mypassword
windowSize: 800*600
ConnectICA
This Action opens a new Citrix connection based on an ICA file that can be given as a full or relative path, or from a string that can be a variable. The established connection is contextual to the User Path and will be used to perform all the other actions .
Parameters
icaFilePath (optional): The file path to the ICA File, absolute or relative path to <project>/custom-resources
icaFileAsString (optional): The content of the ICA File as a String.
windowSize (optional): Force the size of the window width*height like 800*600
icaFile.<rubric>.<name> (optional): Override or add any property inside the icafile, under a specific [rubric] for any <name>=<value> Default value is "<value>".
properties.<propertyName> (optional): Any <propertyName> associated to <propertyValue> that must be set to the ICA Client before connection.
connectTimeoutInMs (required): Maximum timeout in milliseconds to wait for connect and login to the server. Default value is "180000".
ocrDataPath (optional): In case you want to do OCR in a non-English language, download the file from https://github.com/tesseract-ocr/tessdata_fast, put it into <yourproject>/custom-resources folder and name it like "fra.traineddata".
useCacheForHashes (optional): For heavy load and SHA2/OCR strong usage, you may try to use cache in order to reduce disk/cpu consumption. Default value is "false".
noGuiMode (optional): Set to "false" to force to display GUI, even while running a test Default value is "true".
encryptionLevelSession (optional): The encryption level of the ICA connection [Basic, EncRC5-0, EncRC5-40, EncRC5-56, EncRC5-128].
connectMode (optional): The connection mode, either as one single step in mode "CONNECT_AND_LOGON" or in two steps mode, first "CONNECT", then "LOGON.
Example
Connection to CITRIX server with an ICA File:
icaFileAsString: ${IcaContent}
connectTimeoutInMs: 180000
windowSize: 800*600
Connection with an override of a property:
icaFileAsString: ${IcaContent}
connectTimeoutInMs: 180000
windowSize: 800*600
icaFile.WFClient.ProxyTimeout: 60000
Connection with an ICA File without StoreFront and variabilization of user name and password:
This Action logs off and disconnects the currently connected user from the Citrix Server.
Parameters
disconnectTimeoutInMs (required): Maximum timeout in milliseconds to wait for logoff and disconnect from the server. Default value is "60000".
ignoreErrors (required): True of false to ignore disconnection errors. Default value is "false".
secureDelay (optional): Secured delay after a successful disconnect. Default value is "4000".
recyclingIterations (optional): Every X number of iterations, Citrix client will be destroyed and a new one will be created. If 0, recycling is disabled. Default value is "25".
Example
Disconnect from CITRIX server with an ICA File:
disconnectTimeoutInMs: 60000
ignoreErrors: true
KeyType
This Action sends a key with an optional list of modifiers.
modifiers (optional): Comma separated modifiers from the following: [ALT, CTRL, SHIFT, EXTENDED].
Example
Type the key "Enter":
keyCode : ENTER
MouseClick
Parameters
This Action sends a mouse click or double click, of the specified button and optionally a key modifier.
Parameters
windowName (optional): Window name, that can be a regular expression. If empty, the working area is the full screen. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parentheses, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
mousePosition (required): Mouse position, like “x,y”. Position is relative to the ICA Client Window if no windowName specified, or relative to the windowName specified.
mouseButton (required): Mouse button: LEFT_BUTTON, RIGHT_BUTTON or MIDDLE_BUTTON Default value is "LEFT_BUTTON".
doubleClick (required): Is a double click or not. Default value is "false".
modifiers (optional): Comma separated modifiers from the following: [ALT, CTRL, SHIFT, EXTENDED].
clickDelayInMs (optional): Delay in milliseconds between the mouse click DOWN and the click UP. Default value is "0".
doubleClickDelayInMs (optional): Delay in milliseconds between the two clicks for a double click. Default value is "100".
Example
A click at the position 69,191 on the “Document” window:
windowName: Document
mousePosition: 69,191
doubleClick: false
mouseButton: LEFT_BUTTON
MouseMove
This Action sends a mouse move event and optionally a key modifier.
Parameters
windowName (optional): Window name, that can be a regular expression. If empty, the working area is the full screen. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parentheses, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
mousePosition (required): Mouse position, like x,y. Position is relative to the ICA Client Window if no windowName specified, or relative to the windowName specified.
mouseButton (optional): Mouse button: LEFT_BUTTON, RIGHT_BUTTON or MIDDLE_BUTTON.
modifiers (optional): Comma separated modifiers from the following: [ALT, CTRL, SHIFT, EXTENDED].
Example
To move the mouse at the position 90,180 on the “Document” window:
windowName: Document
mousePosition: 90,180
doubleClick: false
mouseButton: LEFT_BUTTON
ScreenshotGet
This Action computes Citrix hash and "toleranceData" of the full screen or a specific region (by filling parameter “windowRect”) or a specific window (by filling parameter “windowName”). Both computed values can either be retrieved on the Action result, or by providing variable names as input parameters.
Parameters
windowName (optional): Window name, that can be a regular expression. If empty, the working area is the full screen. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parenthesis, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
windowRect (optional): Region of the window in the format: [poxX,poxY,width,height]. Iit will be absolute coordinate if no “windowName”, or relative coordinate if “windowName” is specified or empty if full screenshot.
hashVariableName (optional): Name of the NeoLoad variable to fill with the Citrix hash. Default value is "hashVariableName".
toleranceDataVariableName (optional): Name of the NeoLoad variable to fill the toleranceData (used on “Screenshotwait” when “toleranceLevel” is lower than EXACT). Default value is "toleranceDataVariableName".
Example
To get the Citrix hash and "toleranceData" of the region [155,81,12,20] in the “Document” window:
This Action waits for Citrix hashes screen and optionally tries to match screen with a “toleranceLevel” in full screen or a specific region (by filling parameter “windowRect”) or a specific window (by filling parameter “windowName”) .
Parameters
windowName (optional): Window name, that can be a regular expression. If empty, the working area is the full screen. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parentheses, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
windowRect (optional): Region of the window in the format: [poxX,poxY,width,height] it will be absolute coordinate if no windowName, or relative coordinate if windowName is specified or empty if full screenshot.
hashes (optional): Citrix hashes list in the format: daf780c43c09882744d4ee90177256c6,daf780c43c09882744d4ee90177256c6.
toleranceLevel (required): Tolerance level: EXACT (only compare hashes), HIGH (matching at 90%), MEDIUM (matching at 80%), LOW (matching at 65%), LOWEST (matching at 50%). Default value is "MEDIUM".
toleranceData (optional): Data used when toleranceLevel is lower than EXACT.
pollingDelayInMs (required): Delay in milliseconds between each screenshot check. Default value is "500".
waitTimeoutInMs (required): Maximum timeout in milliseconds to wait. During recording, NeoLoad creates one constant variable for all Citrix "waitTimeout". The variable is named "citrixWaitTimeoutInMs-<userPathName>
and value is by default 60000 ms.
Example
To wait for the expected Citrix hash or “toleranceData” of the region [152,35,22,11] in the “Document” window. It tries every 500 ms at most 60 000 ms.
This Action extracts text from a window (by filling parameter “windowName”) OR from a specific region (by filling parameter “windowRect”).
Parameters
windowName (optional): Window name, that can be a regular expression. If empty, the working area is the full screen. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parenthesis, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
windowRect (optional): Region of the window in the format: [poxX,poxY,width,height] it will be absolute coordinate if no windowName, or relative coordinate if windowName is specified or empty if full screenshot.
inverseColor (required): When recognizing white text over black background, set it to true to best result. Default value is "false".
variableName (optional): NeoLoad variable in which to put the text extracted from the screen. Default value is "textGetVariableName".
Example
To get the text inside the region [155,81,12,20] in the “Document” window:
windowName: Document
windowRect: [155,81,12,20]
inverseColor: false
TextType
This Action sends a text with an optional list of modifiers.
Parameters
text (required): Alphanumeric text to send on the keyboard.
typingRateInMs (optional): Delay in milliseconds between each key typed. “0” means no delay. Default value is "150".
modifiers (optional): Comma separated modifiers from the following: [ALT, CTRL, SHIFT, EXTENDED].
Example
To type the text "5":
text: 5
TextWait
This Action waits for text to appear in a window (by filling parameter “windowName”) OR in a specific region (by filling parameter “windowRect”).
Parameters
windowName (optional): Window name, that can be a regular expression. If empty, the working area is the full screen. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parentheses, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
windowRect (optional): Region of the window in the format: [poxX,poxY,width,height] it will be absolute coordinate if no windowName, or relative coordinate if windowName is specified or empty if full screenshot.
text (required): Text to look for, can be a regexp.
inverseColor (required): When recognizing white text over black background, set it to true to best result. Default value is "false".
pollingDelayInMs (required): Delay in milliseconds between each check. Default value is "500".
waitTimeoutInMs (required): Maximum timeout in milliseconds to wait. During recording, NeoLoad creates one constant variable for all Citrix "waitTimeout". The variable is named "citrixWaitTimeoutInMs-<userPathName>
and value is by default 60000 ms.
Example
To wait for the text “25” in the region[167,74,34,27] in the “Document” window. It tries every 500 ms at most 60 000 ms.
windowName: Document
windowRect: [152,35,22,11]
text: 25
inverseColor: false
pollingDelayInMs: 500
waitTimeoutInMs: 60000
WindowActivate
This Action activates a window from its title (that can be a regexp).
Parameter
windowName (required): Window name, that can be a regular expression. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parenthesis, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
Example
Activate the window named "Document":
windowName: Document
WindowWait
This Action waits for an event (CREATED, ACTIVATED, DESTROYED) for a window with a title (that can be a regexp) and optionally in a certain region of the screen.
Parameters
windowName (required): Window name, that can be a regular expression. It can contain a Neoload variable.
If a regular expression is used, any characters considered as reserved need to be escaped according to the regex syntax standard (for example characters \|?*+()[]...).
Example of windowName value:
Document (1): will match literally a window named "Document (1)". This is a full string and not a regex, so the parentheses around the number are not escaped.
Document \(\d+\): will match any window named with "Document" followed by any integer in parenthesis, for example "Document (1)", or "Document (10)". This is a regex, so the parentheses are escaped.
Document.*: will match any window starting with string "Document".
${myWindowName}: will match a window name according to the evaluated value of the variable myWindowName, which can be a literal string, or a regex.
windowEvent (required): Event to wait: CREATED, ACTIVATED, DESTROYED Default value is "ACTIVATED".
windowRect (optional): Region of the window in the format: [poxX,poxY,width,height].
waitTimeoutInMs (required): Maximum timeout in milliseconds to wait. During recording, NeoLoad creates one constant variable for all Citrix "waitTimeout". The variable is named "citrixWaitTimeoutInMs-<userPathName>
and value is by default 60000 ms.
Example
Wait at most 60 000 ms that the window named "Document" is activated: