Recording a Close Method for Tests that Use the Classic Agent

To specify the keys, menu items, and buttons that the non-Web recovery system uses to close an individual dialog box, record a Close method to define the appropriate variable in the window declaration for the dialog box.

  1. Open your application.
  2. Open the application’s test frame file.
  3. Place the insertion point on the window declaration for the dialog box.
  4. Choose Record > Method .
  5. From the Method Name list, select Close .
  6. Click Start Recording. Silk Test Classic displays the Record Status dialog box, which indicates that you can begin recording the Close method. The Status field flashes the word Recording.
  7. When you have finished recording the Close method, click Done on the Record Status dialog box. Silk Test Classic opens the Record Method dialog box. The Method Code field contains the 4Test code that you have recorded.
  8. Click OK to close the Record Method dialog box and paste the new Close method in the declaration for the dialog box. You can also specify buttons, keys, and menus that close windows. This is only for classes derived from the MoveableWin class: DialogBox, ChildWin, and MessageBox. Specifying window closing procedures is not necessary for web pages, so this does not apply to BrowserChild objects/classes.