Share this page

# rdp_save_image

Saves a screen-capture of the specified client display area to an image file.

Connection Functions

int rdp_save_image( "StepDescription=<descriptor_name>","FileName=<file_name>", ["ConnectionID=<connection_identifier>",] "ImageTop=<y_pos>", "ImageLeft=<x_pos>", "ImageHeight=<bitmap_height>", "ImageWidth=<bitmap_width>", , "Origin=<Recorded|Synched|Default>", RDP_LAST );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All string arguments (char type) can be parameterized using standard parameterization.

Argument | Description
--- | ---
StepDescription | A descriptive, unique name for this step. Use any text.
FileName | The image file name.
ConnectionID | The name of the connection on which this function operates. Do not change the recorded ID. If several connections are open and the ID is not specified, the first connection in the script is used. If only one connection is open, the connection ID is not required.
ImageTop | The Y-coordinate of top-left corner of the specified area on the RDP client window.
ImageLeft | The X-coordinate of the top-left corner of the specified area on the RDP client window.
ImageHeight | The height of the specified area on the RDP client window.
ImageWidth | The width of the specified area on the RDP client window.
Origin | Specifies which set of coordinates to use. Possible values are: Recorded (the exact recorded coordinates), Synched (the adjusted coordinates using the offset from the last image synchronization), and Default (use the option specified in the runtime settings).
RDP_LAST | The delimiter marking the end of the argument list.

The rdp_save_image function takes a screen capture of the specified area and saves it to a file. The default path for the file is the Vuser results log directory. This function is not recorded. It can be added manually when enhancing the script.

## Example

The following example shows an image saved into a file called kuku2.

rdp_save_image( "StepDescription=mystep",

"FileName=c:\\tmp\\kuku2",

"ImageTop=0",

"ImageLeft=0",

"ImageHeight=600",

"ImageWidth=400",

"Origin=Default",

RDP_LAST );

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: