Recording a Close Method for Tests that Use the Open 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. Choose Record > Testcase. Silk Test Classic displays the Record Testcase dialog box.
  4. From the Application state list box, click (None).
  5. Click Start Recording. Silk Test Classic opens the Recording window, which indicates that you can begin recording the Close method.
  6. When you have finished recording the Close method, click Stop on the Recording window. Silk Test Classic redisplays the Record Testcase dialog box.
  7. Click Paste to Editor and then copy and paste the script in the declaration for the dialog box in the test frame file.
  8. Choose File > Save to save the test frame file.

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.