Share this page

# TruClient functions

You can use TruClient API functions in JavaScript code for your TruClient scripts.

In this topic:

## Function types

The TruClient API includes both synchronous and asynchronous functions.

- Synchronous functions: These functions can be used in every field in TruClient that can evaluate JavaScript, such as in step arguments, objects, and descriptor fields. However, while synchronous functions can be used in objects and descriptor fields, this use is not recommended because it can cause unexpected results.

  For details on supported functions, see TruClient - Web synchronous functions in the Function Reference .

- Asynchronous functions: These functions can be used in step argument fields in TruClient that can evaluate JavaScript. They cannot be used in objects and descriptor fields.

  For details on supported functions, see TruClient - Web asynchronous functions in the Function Reference .

  For details on how to use asynchronous APIs, see Use asynchronous APIs in JavaScript code.

Note:

- Support for using synchronous APIs in JavaScript code will be deprecated in a future version. OpenText recommends using asynchronous APIs instead. For details, see Replace synchronous APIs with asynchronous APIs.

- TruClient - Native Mobile scripts do not support asynchronous APIs. OpenText recommends using Generic API Action steps instead. For details, see Replace synchronous APIs with Generic API Action steps.

Back to top

## General notes on using TruClient functions

- Use escape backslashes in path arguments. For example, `c:\\temp\\myFile.ps1`.

- The following arguments can be used with any method:

  - object. The step's object as defined in the application.

  - AUT.window. Points to the global window object within the active window or tab of the application.

  - AUT.document. The global document object within the active window or tab of the application.

  The AUT API provides a common mechanism for handing the AUT window and AUT document for all TruClient protocols. For details, see Use JavaScript in the AUT window.

Back to top

See also:

- TruClient step arguments
- TruClient properties

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1 All View Local Help Center View Online Help Center Version: