Recording a Scripted Class

This functionality is supported only if you are using the Classic Agent.

Use the Record Class Scripted dialog box to record a new class declaration for an application that is based on one of the following technology domains:
  • Windows Forms
  • Visual Basic
  • Active X
  • Java
Paste to Editor
Click to paste the new class to the open include file.
  1. Click Record > Class > Scripted. The Record Class Scripted dialog box appears. The Window field displays the object declaration for the control on which the mouse cursor is currently positioned.
  2. Move the mouse cursor over the object in your application under test for which you want to record a class.
  3. Press Ctrl+Alt to pause tracking. The methods and properties for the class are displayed in the corresponding fields.
  4. Type a name for the class into the Class name field. This is the new class for the object that is displayed in the Window field.
  5. Type a tag for the class into the Tag field. The new class is identified by this tag in any XPath locators.
  6. Select a class from the Derived from list. The new class is derived from this class, for example AnyWin.
  7. Optional: Check the Show all classes check box to expose any ignored classes.
    Note: Checking this check box might decrease performance. Keep this check box unchecked unless it is explicitly needed.
  8. Optional: Check the Show all methods check box to display all native methods with return or parameter types that do not match 4Test methods in the Methods field. These methods are shown with comments (//) in the method list. By default, this check box is unchecked.
  9. Optional: Check the Keep on top check box to keep the Record Class Scripted dialog box in the foreground even when you are moving the mouse cursor over your application. By default, this check box is checked.
  10. Click Pause Tracking to pause tracking. For example, pause tracking to paste the recorded class to the editor.
  11. Click Resume Tracking to continue recording.
  12. Click Copy to Clipboard to copy the new class to the clipboard. The Record Class dialog box is cleared. When you have closed the Record Class Scripted dialog box, you can click Edit > Paste to insert the code from the Clipboard into the location of your choice in the current window, or even into another editor window.
  13. Click Paste to Editor to paste the new class to the open include file.