SAP GUI scripting API and UFT One

UFT One works directly with the SAP GUI Scripting API to record your operations. Therefore, UFT One adds steps to your test or business component only when API events are sent to the server. This means that while recording a test or business component, you may perform several operations on your application before the corresponding steps are added. When you perform a step that sends information to the server, UFT One inserts steps with the relevant Windows-based SAP objects.

Example 1: Check Boxes

Suppose you record the steps of filling in a Price Simulation for Material form. You select the three check boxes in the form (Incl. cash discount, Delivery costs, and Effective price) and click Continue. When you click the Continue button, information is sent to the SAP server, and the steps in which you select the check boxes and click the Continue button are added to your test at once:

Back to top

Example 2: Radio Buttons

Suppose you select a radio button to change the reporting period in the Reconcile Plan Versions transaction of your SAP GUI for Windows application. This radio button is labeled Current Year.

UFT One uses the SAP GUI business component type (41) to identify the object as an SAPGuiRadioButton object. It creates an SAPGuiRadioButton test object with the name Current Year and records the following properties and values as the description for the radio button.

Note: The guicomponenttype and name property values are supplied by the SAP GUI Scripting API.

UFT One also records that you performed a Set method to turn ON the radio button.

UFT One adds a step as follows:

During the run session, UFT One looks up the description for the SAPGuiRadioButton object with the name Current Year by searching the object repository. UFT One finds the following description:

attachedtext:=Current Year

UFT One then looks in the application for an SAPGuiRadioButton object that matches the above description. When it finds the object, it performs the Set method on it to change the value of the field to ON (selects the radio button).

Back to top