Example: ctrx_unset_window

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_set_window("Mercury at mercuryinteractive.com");

/* 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_unset_window("Mercury at mercuryinteractive.com");