Agent for Citrix Presentation Server - Overview
The Agent for Citrix Presentation Server, or Citrix Agent, is an optional utility that you can install on the Citrix server. It provides enhancements to the normal Citrix functionality. The following sections describe these enhancements.
It is provided in the product's installation disk and you can install it on any supported Citrix server. For more information, see Install the LoadRunner Citrix agent on the Citrix server. (Optional) For details on supported Citrix server versions, see the System Requirements.
If the Citrix Agent is installed on the Citrix server, then when you record a Citrix script, VuGen records specific information about the active object instead of general information about the action. For example, VuGen generates Obj Mouse Click and Obj Mouse Double Click steps instead of the Mouse Click and Mouse Double Click that it generates without the agent.
The following example shows the same mouse-click action recorded with and without the agent installation. Note that with an agent, VuGen generates ctrx_obj_xxx functions for all of the mouse actions, such as click, double-click, and release.
/* Without Agent Installation */
ctrx_mouse_click(573, 61, LEFT_BUTTON, 0, test3.txt - Notepad); /* WIth Agent Installation */ ctrx_obj_mouse_click("<text=test3.txt - Notepad class=Notepad>" 573,
61, LEFT_BUTTON, 0, test3.txt - Notepad=snapshot21, CTRX_LAST);
In the example above, the first argument of the ctrx_obj_mouse_click function contains the text of the window's title and the class, Notepad. Note that although the agent provides additional information about each object, Vusers only access objects by their window name and the object coordinates.
The Citrix Agent lets you see which objects VuGen detects in the client window . This includes all Windows Basic Objects such as edit boxes, buttons, and item lists in the current window.
To see the detected objects, you move your mouse through the snapshot. VuGen highlights the borders of the detected objects as the mouse passes over them.
In the following example, the Yes button is one of the detected objects.
When you click within a snapshot, you can insert several functions into the script using the right-click menu. When no agent is installed, you are limited to the Insert Mouse Click, Insert Mouse Double Click, Insert Sync on Bitmap , and Insert Get Bitmap Value. If you are using a 256-color set, the Insert Sync on Bitmap and Get Bitmap Value steps are not available from the right-click menu.
If the Citrix Agent is installed on the Citrix server, the following additional options are available from the right-click menu of the Citrix window in focus:
Obj Get Info and Sync on Obj Info. Provide information about the state of the object: ENABLED, FOCUSED, VISIBLE, TEXT, CHECKED, and LINES.
Insert Sync on Obj Info. Instructs VuGen to wait for a certain state before continuing. This is generated as a ctrx_sync_on_obj_info function.
Insert Obj Get Info. Retrieves the current state of any object property. This is generated as a ctrx_get_obj_info function.
Insert Sync on Text and Get Text.
These commands are interactive—when you insert them into the script, you are prompted to mark the object or text area in the snapshot.
In the following example, the ctrx_sync_on_obj_info function provides synchronization by waiting for the Font dialog box to come into focus.
ctrx_sync_on_obj_info("Font", 31, 59, FOCUSED, "TRUE", CTRX_LAST);
Utilizing VuGen's ability to detect objects, you can perform actions on specific objects interactively, from within the snapshot.
Click at a point within the Step Navigator to insert the new step. Make sure that a snapshot is visible.
Click within the snapshot.
To mark a bitmap:
- Select it and choose Insert Sync on Bitmap from the right-click menu.
- Mark the required area.
- Click OK in the Sync on Bitmap dialog box. VuGen inserts the step into the script after the currently selected step.
For all other steps, move your mouse over snapshot objects to determine which items are active—VuGen highlights the borders of active objects as the mouse passes over them.
When the object is highlighted, right-click and select one of the Insert commands. A dialog box opens with the step's properties.
Set the desired properties and click OK. VuGen inserts the step into your script.
With the agent installed, VuGen lets you save standard text to a buffer. Note that VuGen can only save true text—not a graphical representation of text in the form of an image.
You save the text using the Get Text step either during or after recording.
For additional details, see Citrix - Manual Synchronization.