Example Citrix Synchronization Functions

Waits for a window to close in the Citrix client.

int ctrx_unset_window( char *window_name, [CONTINUE_ON_ERROR,] CTRX_LAST );

window_name The window title.
CONTINUE_ON_ERROR A constant, entered as shown without quotes. Overrides the error behavior run-time setting for this step so that script behaves as though the run-time setting was Continue on error.
CTRX_LAST A marker that indicates the end of the argument list.

ctrx_unset_window is a synchronization function that waits for a window to close before the test run continues.

The window_name argument indicates the name of the window as it appears in the window's top header frame. The asterisk wildcard character (*) can be used in window_name.

Return Values

Citrix ICA Return Values


The parameter window_name can be parameterized.


In the following example, ctrx_set_window waits for the window of Microsoft's Internet Explorer. Internet Explorer's home page is the Mercury Interactive site. Therefore, the string "Mercury at mercuryinteractive.com" appears in the header frame of the window.

The user then exits the browser (using ctrx_mouse_click) and ctrx_unset_window is automatically generated by VuGen to wait for the window to close.

/* Launch the web browser by clicking on the desktop IE icon */
ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, NULL, CTRX_LAST);
ctrx_set_window("Mercury at mercuryinteractive.com", CTRX_LAST);

/* Exit the web browser by clicking on top left Exit check box */
ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
    "Mercury at mercuryinteractive.com", CTRX_LAST);

ctrx_unset_window("Mercury at mercuryinteractive.com", CTRX_LAST);