Running Code under Application Under Test from the UFT Context

When the Custom Server is running in the UFT context, there is no direct access to the control, which is in a different run-time process. To access the control directly, run part of the code in the Application under test context. This is done using assistant classes.

To launch code from the UFT context that will run under the Application under test context, implement an assistant class that inherits from CustomAssistantBase. To create an instance of an assistant class, call CreateRemoteObject. Before using the object, attach it to the control with SetTargetControl.

After SetTargetControl is called, you can call methods of the assistant in one of the following ways:

For more information, see Reviewing Commonly-used API Calls.