Share this page

# rdp_sync_on_agent

Waits until the RDP client locates a running RDP agent on the RDP server.

Synchronization Functions

int rdp_sync_on_agent( "StepDescription=step_description", ["ConnectionID=connection_identifier",] ["Timeout=timeout_value",] "FailStepIfNotFound=<Default | Yes | No>", RDP_LAST );

This function returns one of the following:

LR_PASS (0): The function completed without error.

LR_FAIL (1): The function completed with errors.

LR_NOT_FOUND (2): The function's FailStepIfNotFound argument is set to No and the RDP agent is not running on the remote machine.

LR_PASS does not indicate that the test step passed-only that the function ran to completion. For example, LR_PASS does not indicate that the server returned the expected value.

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

Argument | Description
--- | ---
StepDescription | A descriptive, unique name for this step. Use any text.
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.
Timeout | The wait time in seconds. If the timeout is exceeded, the function returns LR_FAIL. If no timeout is passed, the default value is taken from the runtime settings.
FailStepIfNotFound | Possible values: Yes, No, or Default. If the agent is not running on the remote machine and this argument is set to No then the function returns LR_NOT_FOUND (2).
RDP_LAST | The delimiter marking the end of the argument list.

The rdp_sync_on_agent function is a synchronization function that suspends the script run until one of the following occurs: The RDP client computer recognizes the existence of a running RDP agent on the RDP server, or the function times out.

The function is generated automatically during code generation when the Use RDP Agent RDP advanced code generation option is selected and an RDP agent-based function is recorded. The rdp_sync_on_agent function is inserted at the beginning of RDP agent-based scripts after the login stage and before the call to RDP agent-based API functions.

## Example

The following shows that the script waits 60 seconds to locate an RDP agent running on the RDP Server.

rdp_sync_on_agent(

"StepDescription=SynchronizeAgent",

"FailStepIfNotFound=Yes",
"Timeout=60",
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: